[Gtkradiant] [Bug 790] file-->pointfile
gtkradiant@zerowing.idsoftware.com
gtkradiant@zerowing.idsoftware.com
Sat, 12 Apr 2003 05:27:08 -0500
http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=790
------- Additional Comments From havoc@telefragged.com 2003-04-12 05:27 -------
Reproducibility: crash if <mapname>.lin file missing.
problem: vfsLoadFullPathFile returns -1 if the file is missing, apparently it
used to return 0 (which could be confused with an empty file), this caller code
was not updated to check for -1.
fix: change the == 0 on radiant/points.cpp line 155 to <= 0
P.S. I found more occurences of this mistake elsewhere in radiant:
plugins/eclassfgd/plugin.cpp line 645 (identical bug - crash if file missing)
radiant/eclass_def.cpp line 283 (identical bug - crash if file missing)
radiant/texwindow.cpp line 1251 (this might crash if the shader file is 0 bytes)