Changeset - r10153:c711d8280d44
[Not reviewed]
master
0 1 0
smatz - 16 years ago 2008-09-16 11:19:07
smatz@openttd.org
(svn r14340) -Fix (r11822): signs from old savegames were lost (causing little memory leaks)
1 file changed with 8 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/openttd.cpp
Show inline comments
 
@@ -1365,6 +1365,14 @@ bool AfterLoadGame()
 
			wp->name = CopyFromOldName(wp->string);
 
			wp->string = STR_EMPTY;
 
		}
 

	
 
		for (uint i = 0; i < GetSignPoolSize(); i++) {
 
			/* invalid signs are determined by si->ower == INVALID_PLAYER now */
 
			Sign *si = GetSign(i);
 
			if (!si->IsValid() && si->name != NULL) {
 
				si->owner = OWNER_NONE;
 
			}
 
		}
 
	}
 

	
 
	/* From this point the old names array is cleared. */
0 comments (0 inline, 0 general)