bnoazx005 / TDEngine2

TDEngine2 is a cross-platform game engine
Apache License 2.0
18 stars 4 forks source link

[Bug] CConfigFileReader works incorrectly with different radixes #24

Closed bnoazx005 closed 5 years ago

bnoazx005 commented 5 years ago

Bug report

CConfigFileReader incorrectly works with different radixes except decimal one. When your configuration file contains something like these 0x40, 0456 they won't be recognized correctly.

Environment

Win10 (x64) / Visual Studio 2017

Steps to reproduce the issue

  1. Create the following configuration file
    [test]
    hex-value=0x42
  2. Try to parse it using CConfigFileReader for that.

What's the expected result?

We should get 66 within the parameters map instead of either 0 or 42.

What's the actual result?

We've got 0, because of errors during the parsing process

bnoazx005 commented 5 years ago

Fixed in 6f661413dea11bf0609da38273ddd7ef3e67a98a