From 6e45c565a0bc8d05279b0b2458a3fb718ae0924c Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 4 Apr 2015 20:52:55 +0200 Subject: [PATCH] - fixed: FResourceLump::LumpNameSetup's iname parameter can point to the FullName variable's stringbuffer so any assignment to that variable must be done indirectly. --- src/resourcefiles/resourcefile.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/resourcefiles/resourcefile.cpp b/src/resourcefiles/resourcefile.cpp index 223ad861e..ebeb40d96 100644 --- a/src/resourcefiles/resourcefile.cpp +++ b/src/resourcefiles/resourcefile.cpp @@ -98,7 +98,8 @@ void FResourceLump::LumpNameSetup(const char *iname) base = base.Left(base.LastIndexOf('.')); uppercopy(Name, base); Name[8] = 0; - FullName = iname; + FString temp = iname; // Note: iname can point to inside FullName's string buffer so we cannot do the assignment directly. + FullName = temp; // Map some directories to WAD namespaces. // Note that some of these namespaces don't exist in WADS.