// Print the datadir searchpath to stdout, one path per
// line. Then exit. Intended for use by the supertux-editor.
char **sp;
- size_t sp_index;
sp = PHYSFS_getSearchPath();
if (sp)
- for (sp_index = 0; sp[sp_index]; sp_index++)
+ for (size_t sp_index = 0; sp[sp_index]; sp_index++)
std::cout << sp[sp_index] << std::endl;
PHYSFS_freeList(sp);
}
<< _( "Environment variables:") << "\n"
<< _( " SUPERTUX2_USER_DIR Directory for user data (savegames, etc.)" ) << "\n"
<< _( " SUPERTUX2_DATA_DIR Directory for the games datafiles" ) << "\n"<< "\n"
-
-
-
+
+
+
<< std::flush;
}
else
{
int width, height;
- if (sscanf(argv[i], "%dx%d", &width, &height) != 2)
+ if (sscanf(argv[i], "%9dx%9d", &width, &height) != 2)
{
throw std::runtime_error("Invalid geometry spec, should be WIDTHxHEIGHT");
}
aspect_width = 0;
aspect_height = 0;
}
- else if (sscanf(argv[i], "%d:%d", &aspect_width, &aspect_height) != 2)
+ else if (sscanf(argv[i], "%9d:%9d", &aspect_width, &aspect_height) != 2)
{
throw std::runtime_error("Invalid aspect spec, should be WIDTH:HEIGHT or auto");
}