fixed warning

This commit is contained in:
Anselme 2016-06-06 10:05:09 +02:00
parent 1ca3c7d3d8
commit 6fa86842bd

View File

@ -60,7 +60,7 @@ int main(int argc, char *argv[])
packName = packName.substr(0, packName.find_first_of('.')); packName = packName.substr(0, packName.find_first_of('.'));
for(char c : packName) for(char c : packName)
{ {
if(!(c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z' || c >= '0' && c <= '9')) if(!((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9')))
{ {
printf("error : \"%s\" is an invalid resource pack name, it must match this regex : [a-zA-Z0-9]+\n", packName.c_str()); printf("error : \"%s\" is an invalid resource pack name, it must match this regex : [a-zA-Z0-9]+\n", packName.c_str());
return EXIT_SUCCESS; return EXIT_SUCCESS;
@ -94,7 +94,7 @@ int main(int argc, char *argv[])
} }
} }
fprintf(out, "\nvoid getResourcePack_%s(ResourceMap &resourceFilesData)\n{\n", packName.c_str()); fprintf(out, "\nvoid getResourcePack_%s(ResourceMap &resourceFilesData)\n{\n", packName.c_str());
for(int i=0; i<n; ++i) for(int i=0; i<int(n); ++i)
fprintf(out, "\tresourceFilesData[\"%s\"] = data%d;\n", argv[3+i]+offsets[i], i); fprintf(out, "\tresourceFilesData[\"%s\"] = data%d;\n", argv[3+i]+offsets[i], i);
fprintf(out, FILE_END); fprintf(out, FILE_END);
fclose(out); fclose(out);