summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2006-10-19 12:21:35 +0000
committerpeter1138 <peter1138@openttd.org>2006-10-19 12:21:35 +0000
commitdd8bd7be0ec9789d64f174e39da330f9d9d489ad (patch)
tree6ef31775508a973cf2d9642e24b44e430bf7847c
parent45fa2a12fd38c559ccb3d38178b77c16d4e4bd5e (diff)
downloadopenttd-dd8bd7be0ec9789d64f174e39da330f9d9d489ad.tar.xz
(svn r6838) - Fix (r6836): MS VC complains beecause it doesn't understand consts... (or I don't...)
-rw-r--r--newgrf_spritegroup.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/newgrf_spritegroup.c b/newgrf_spritegroup.c
index 57372f51b..5ae33f4cb 100644
--- a/newgrf_spritegroup.c
+++ b/newgrf_spritegroup.c
@@ -19,10 +19,11 @@ static MemoryPool _spritegroup_pool;
void DestroySpriteGroup(SpriteGroup *group)
{
/* Free dynamically allocated memory */
+ /* XXX Cast away the consts due to MSVC being buggy... */
switch (group->type) {
case SGT_REAL:
- free(group->g.real.loaded);
- free(group->g.real.loading);
+ free((SpriteGroup**)group->g.real.loaded);
+ free((SpriteGroup**)group->g.real.loading);
break;
case SGT_DETERMINISTIC:
@@ -31,7 +32,7 @@ void DestroySpriteGroup(SpriteGroup *group)
break;
case SGT_RANDOMIZED:
- free(group->g.random.groups);
+ free((SpriteGroup**)group->g.random.groups);
break;
default: