diff options
| author | johannes <johannes.herman@gmail.com> | 2024-02-07 14:53:55 +0100 |
|---|---|---|
| committer | johannes <johannes.herman@gmail.com> | 2024-02-07 14:53:55 +0100 |
| commit | d67c36c7b8457a78f2a0080fd79b062f6c9142c7 (patch) | |
| tree | fcda8a7647c5068774bd76492305fc6e041e2437 | |
| parent | aa6b62c010240c2dca5d37c6b5fc6ff4c2b80d99 (diff) | |
fixed bug in writedemomap, did not write mapmagic
| -rw-r--r-- | src/demo.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -355,13 +355,17 @@ int writedemotimeline(FILE *fp, demotimeline *dt) int writedemomap(FILE *fp, demomap *dm, int mapsize, unsigned char ver) { if (ver >= 6) + { + // TODO is this magic for v6+ only? + if (fwrite(mapmagic, 1, sizeof(mapmagic), fp) != sizeof(mapmagic)) + return -1; if (fwrite(dm->sha256, 1, 32, fp) != 32) return -1; + } if (fwrite(dm->data, 1, mapsize, fp) != mapsize) return -2; - return 1; } |
