Skip to content

Commit 2043db3

Browse files
authored
Fix compilation error
You cannot perform ordered comparison on pointer and integer
1 parent 816a868 commit 2043db3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

sound.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ bool loadMusicInfo(string dir) {
122122
for(int i=0; i<size(dir); i++) if(dir[i] == '/' || dir[i] == '\\')
123123
dir2 = dir.substr(0, i+1);
124124
char buf[1000];
125-
while(fgets(buf, 800, f) > 0) {
125+
while(fgets(buf, 800, f) != NULL) {
126126
for(int i=0; buf[i]; i++) if(buf[i] == 10 || buf[i] == 13) buf[i] = 0;
127127
if(buf[0] == '[' && buf[3] == ']') {
128128
int id = (buf[1] - '0') * 10 + buf[2] - '0';

0 commit comments

Comments
 (0)