]> git.mxchange.org Git - quix0rs-blobwars.git/blobdiff - src/intro.cpp
Fix all issues found by the Clang Static Analyzer.
[quix0rs-blobwars.git] / src / intro.cpp
index ca84b0572338ac87c71adc604a0d80f03ac59a85..697daf2fd6d348ff415c1653610ea5200c3f0807 100644 (file)
@@ -38,7 +38,7 @@ void playIntro(int tx, int ty, int delay)
 
                if (!line[i])
                {
-                       graphics.showErrorAndExit("Malformed Intro Data", "");
+                       return graphics.showErrorAndExit("Malformed Intro Data", "");
                }
 
                text[i] = NULL;
@@ -163,11 +163,11 @@ int doIntro()
 
        audio.playMusic();
 
-       char *line = strtok((char*)engine.dataBuffer, "\n");
+       strtok((char*)engine.dataBuffer, "\n");
 
        while (true)
        {
-               line = strtok(NULL, "\n");
+               char *line = strtok(NULL, "\n");
                sscanf(line, "%d %d %d", &x, &y, &delay);
 
                if (delay == -1)