All pastes #1017533 Raw Edit

libfat bug?

public cpp v1 · immutable
#1017533 ·published 2008-05-14 01:40 UTC
rendered paste body
#include <nds.h>#include <stdio.h>#include <fat.h>#include <sys/dir.h>void log(const char* msg){	FILE *logfile = fopen("log.txt","a");	fprintf(logfile, msg);	fclose(logfile);}void test(){	log("In test\n");	DIR_ITER *dp = diropen("/fonts/");	log("Opened directory\n");	// Note: Fails with 128 as well; only works if upped even more. 255 works	char filename[64];	dirnext(dp, filename, NULL);	log("Called dirnext()\n");	dirclose(dp);	log("Last line of test()\n");}int main(){	fatInitDefault();	log("Calling test()\n");	test();	log("test() done. This won't ever print.\n");}