소스 검색

Fixed another loopwave crash with no command line arguments

Sam Lantinga 11 년 전
부모
커밋
5907cfaadf
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      test/loopwave.c

+ 1 - 1
test/loopwave.c

@@ -97,7 +97,7 @@ main(int argc, char *argv[])
     }
     }
     /* Load the wave file into memory */
     /* Load the wave file into memory */
     if (SDL_LoadWAV(filename, &wave.spec, &wave.sound, &wave.soundlen) == NULL) {
     if (SDL_LoadWAV(filename, &wave.spec, &wave.sound, &wave.soundlen) == NULL) {
-        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't load %s: %s\n", argv[1], SDL_GetError());
+        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't load %s: %s\n", filename, SDL_GetError());
         quit(1);
         quit(1);
     }
     }