beltoforion / muparserx

A C++ Library for Parsing Expressions with Strings, Complex Numbers, Vectors, Matrices and more.
http://beltoforion.de/en/muparserx
BSD 2-Clause "Simplified" License
137 stars 60 forks source link

Inconsistent Use of Signedness for Binary and Hex Numbers #108

Open drocheam opened 3 years ago

drocheam commented 3 years ago

The HexValReader class converts numbers to a unsigned int value, while the BinValReader converts to a signed int. This is due to mpValReader.cpp, line 247, where a cast from unsigned int to signed int takes place.

A consistent conversion for both number types, for example to signed int, would be advisable.