← All bug reports

FS#1321dxflib: Handles not parsed correctly

Type
Bug
Status
Closed
Resolution
Fixed
Category
dxflib
Severity
Low
Priority
Low
Reported version
3.12.3
Operating system
All
Reported
2015-12-08 by andrew
Closed
2015-12-08 by andrew

I did noticed a bug in the lib: Indeed, the handle numbers that DL_Dxf is parsing are in most case incorrect.
I believe this is due to the way then handle number is parsed in DL_Dxf::processDXFGroups.
The handle is parsed by calling the function getIntValue, which itself calls the function toInt to convert the handle from std::string to int by calling the function std::strtol(handle, NULL, 10).
However, the handle numbers in a dxf file are stored as hexadecimal.
I wrote a quick and easy fix to this issue, just tell me if you are interested!