Crash when trying to chance working directory
When I try to change directories to load an image with the following code:
ALLEGRO_PATH *path = al_get_standard_path(ALLEGRO_RESOURCES_PATH);
const char * pathstr = al_path_cstr(path, ALLEGRO_NATIVE_PATH_SEP);
fprintf(stderr, "Erro na mudanca de diretorio.\n");
the program simply crashes. It's really weird, since I got the code from older posts so it's supposed to be working.
Also, when I type printf("%s\n", al_get_current_directory); it just prints garbage.
No, it was actually an error. Now it prints the directory where my source is. THank you! However, I've still got two problems: there is an image there that doesn't load AND my program crashes when I try to get my current directory.
Thread #613668. Printed from Allegro.cc
Yes, that was the case. Thank you.