]> git.sesse.net Git - nageru/blobdiff - shared/bin2h.cpp
On errors, abort() instead of exit(1); exit() in a multithreaded program just gives...
[nageru] / shared / bin2h.cpp
index a396afe92a5f390a700b200fa821fcc23b725d89..80c26518a42b6696383c02818d8b4c9358eda905 100644 (file)
@@ -20,13 +20,13 @@ int main(int argc, char **argv)
        FILE *infp = fopen(argv[1], "rb");
        if (infp == nullptr) {
                perror(argv[1]);
-               exit(1);
+               abort();
        }
 
        FILE *outfp = fopen(argv[3], "w");
        if (outfp == nullptr) {
                perror(argv[3]);
-               exit(1);
+               abort();
        }
 
        fprintf(outfp, "// Generated by bin2h.cpp from %s. Do not edit by hand.\n", argv[1]);