fixed reading boolean values from files that are neither 0 nor 1
[rocksndiamonds.git] / src / files.c
index f838f666f7ceedb9bf5ed7a54023cfcf09f8bbb0..e9cd81135f9ed2a2950777a26e26f539c9cdbdd3 100644 (file)
@@ -3160,7 +3160,7 @@ static int LoadLevel_MicroChunk(File *file, struct LevelFileConfigInfo *conf,
          value = getMappedElement(value);
 
        if (data_type == TYPE_BOOLEAN)
-         *(boolean *)(conf[i].value) = value;
+         *(boolean *)(conf[i].value) = (value ? TRUE : FALSE);
        else
          *(int *)    (conf[i].value) = value;