mirror of
https://github.com/ZDoom/zdbsp.git
synced 2024-11-28 06:32:08 +00:00
- Added fixed point range checking for UDMF maps.
SVN r2488 (trunk)
This commit is contained in:
parent
af4a3b8447
commit
35f754610a
1 changed files with 6 additions and 1 deletions
|
@ -119,7 +119,12 @@ double CheckFloat(const char *key)
|
|||
|
||||
fixed_t CheckFixed(const char *key)
|
||||
{
|
||||
return (fixed_t)(CheckFloat(key)*65536.);
|
||||
double val = CheckFloat(key) * 65536;
|
||||
if (val < double(INT_MIN) || val > double(INT_MAX))
|
||||
{
|
||||
SC_ScriptError("Fixed point value is out of range for key '%s'\n\t%.2f should be within [-32768,32767]", key, val);
|
||||
}
|
||||
return fixed_t(val);
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
|
Loading…
Reference in a new issue