Go to QuArK Web Site
Range Check Errors
Updated 05 Apr 2018
Upper levels:
QuArK Information Base
4. The Source Code
4.7. Known bugs in the Source ...

 4.7.1. Range Check Errors

 [ Prev - Up - Next ] 

By enabling Range checking in Delphi (Delphi 6/7: Project > Options... > Compiler > Range checking), the compiler will build in checks into the program to make sure the boundaries of arrays are not crossed, and that non-allocated memory is not referenced.

Don't forget to (re)BUILD the project after toggling this options. If you forget this (and do a normal COMPILE), only the newly changed files will have the altered option applied.


 Index


 Map editor

DanielPharos - 05 Apr 2018   [ Top ] 
  • prog/QkMapPoly.pas (rev 1.89):
    • Line 1877: A range check error occurs the first time this code runs. NbAretes2 (NumberFaces2) becomes negative, which further down the line causes major problems. This happens because ReallocMem can change the pointer to the memory. This code apparently was not written with that in mind. If you 'force' NbAretes2 to use the old pointer value, a lot of other problems appears. This problem could be related to the views not drawing correctly on startup.
      Fixed just after 6.6.0 Beta 4 release.

 Other modules and files

DanielPharos - 05 Apr 2018   [ Top ] 
  • prog/UNZIP.pas (rev 1.7):
    • Line 1370: A range check error sometimes occurs, for instance in STVEF game mode. e is always between 0 and 15, so the range error doesn't occur in mask_bits[e]. I'm not sure what exactly is causing it, but the error appears to be non-critical.

Remark: The ZIP and UNZIP modules are a mess. Somebody should replace these with more up-to-date libraries that have the same (or more) functionality.



Copyright (c) 2022, GNU General Public License by The QuArK (Quake Army Knife) Community - https://quark.sourceforge.io/

 [ Prev - Top - Next ]