Stefan Schuermans commited on 2016-09-04 11:25:08
Showing 2 changed files, with 7 additions and 5 deletions.
make it compile with gcc 5.4 problem found during preparation of "Solinger Lichterfest 2016" together with "Dr Stahl" at "zWerkstatt"
| ... | ... |
@@ -1139,9 +1139,9 @@ stBlinkenMovie *BlinkenMovieLoadBmm(const char *pFilename) |
| 1139 | 1139 |
break; |
| 1140 | 1140 |
BlinkenFrameSetPixel(pFrame, y, x, 0, // set pixel |
| 1141 | 1141 |
(unsigned char)val); |
| 1142 |
- fscanf(pFile, "%*[ \t]"); // kill space |
|
| 1143 |
- if (fscanf(pFile, "%7[0-9A-FXa-fx]", pixel) != 1) // read next |
|
| 1144 |
- // pixel |
|
| 1142 |
+ if (fscanf(pFile, "%*[ \t]") != 0) // kill space |
|
| 1143 |
+ break; |
|
| 1144 |
+ if (fscanf(pFile, "%7[0-9A-FXa-fx]", pixel) != 1) // read next pixel |
|
| 1145 | 1145 |
break; |
| 1146 | 1146 |
} |
| 1147 | 1147 |
y++; // next row |
| ... | ... |
@@ -1185,7 +1185,9 @@ stBlinkenMovie *BlinkenMovieLoadBml(const char *pFilename) |
| 1185 | 1185 |
while (!feof(pFile)) {
|
| 1186 | 1186 |
|
| 1187 | 1187 |
// skip to just before beginning of next tag |
| 1188 |
- fscanf(pFile, "%*[^<]"); |
|
| 1188 |
+ if (fscanf(pFile, "%*[^<]") != 0) |
|
| 1189 |
+ // end loop (error) |
|
| 1190 |
+ break; |
|
| 1189 | 1191 |
// skip beginning character of next tag |
| 1190 | 1192 |
if (fgetc(pFile) != '<') |
| 1191 | 1193 |
// end loop (no more tags) |