Skip to content

Commit e6bff4f

Browse files
committed
Fix Coverity 1370830
Use after free; use the copied string for the Warning
1 parent fe1e9ca commit e6bff4f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

code/scripting/scripting.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1117,7 +1117,7 @@ void script_state::ParseChunkSub(script_function& script_func, const char* debug
11171117

11181118
if(cfp == NULL)
11191119
{
1120-
Warning(LOCATION, "Could not load lua script file '%s'", filename);
1120+
Warning(LOCATION, "Could not load lua script file '%s'", function_name.c_str());
11211121
return;
11221122
}
11231123
else

0 commit comments

Comments
 (0)