Doom-Utils / deutex

WAD composer for Doom, Heretic, Hexen, and Strife
Other
61 stars 17 forks source link

increase array size for char "tname" variable #51

Closed fabiangreffrath closed 6 years ago

fabiangreffrath commented 6 years ago

In src/texture.c:466 the "t" variable is of type signed short, so the theoretically lowest possible value is -32768, which takes 6 digits. The "TEX" string literal takes another 3 digits, so together with the '\0' string delimiter byte we need an array size of 10 bytes for the "tname" variable to be able to store the full maximum length string.