forked from cleolibrary/CLEO4
-
Notifications
You must be signed in to change notification settings - Fork 13
IniFiles Quirks
Seemann edited this page Mar 18, 2026
·
8 revisions
| Function | API Used | Parsing Method |
|---|---|---|
| INT | GetPrivateProfileInt() |
Windows API handles parsing |
| FLOAT |
GetPrivateProfileString() + atof()
|
String read, then C stdlib conversion |
| Function | API Used | Parsing Method |
|---|---|---|
| INT |
GetPrivateProfileString() + strtol()
|
Manual parsing with hex support |
| FLOAT |
GetPrivateProfileString() + strtof()/strtol()
|
Manual parsing with hex support |
| Case | Input | CLEO4 INT | CLEO4 FLOAT | CLEO5 INT | CLEO5 INT (COMPAT) | CLEO5 FLOAT | CLEO5 FLOAT (COMPAT) |
|---|---|---|---|---|---|---|---|
| Positive integer | 42 |
✅42
|
✅42.0
|
✅42
|
✅42
|
✅42.0
|
✅42.0
|
| Negative integer | -42 |
✅-42
|
✅-42.0
|
✅-42
|
✅-42
|
✅-42.0
|
✅-42.0
|
| Float value | 50.0 |
✅50³ |
✅50.0
|
✅50
|
✅50
|
✅50.0
|
✅50.0
|
| Negative float | -50.0 |
✅-50³ |
✅-50.0
|
✅-50
|
✅-50
|
✅-50.0
|
✅-50.0
|
³ Truncates decimal part (strtol stops at decimal point)
| Case | Input | CLEO4 INT | CLEO4 FLOAT | CLEO5 INT | CLEO5 INT (COMPAT) | CLEO5 FLOAT | CLEO5 FLOAT (COMPAT) |
|---|---|---|---|---|---|---|---|
| File not found | N/A | ❌ 0x80000000
|
❌ skip | ❌ skip | ❌ 0x80000000
|
❌ skip | ❌ skip |
| Invalid file (binary) | N/A | ❌ 0x80000000
|
❌ skip | ❌ skip | ❌ 0x80000000
|
❌ skip | ❌ skip |
| Key not found | N/A | ❌ 0x80000000
|
❌ skip | ❌ skip | ❌ 0x80000000
|
❌ skip | ❌ skip |
| Pure string | value_one |
✅0
|
✅ 0.0
|
❌ skip | ✅0
|
❌ skip | ✅ 0.0
|
| Hex integer | 0x42 |
✅ 66¹ |
✅ 66.0
|
✅ 66
|
✅ 66
|
✅ 66.0
|
✅ 66.0
|
| Mixed string | 12.3four |
✅ 12
|
✅ 12.3
|
✅ 12
|
✅ 12
|
✅ 12.3
|
✅ 12.3
|
¹ GetPrivateProfileInt() and atof() support 0x prefix natively (since C++11)
| Issue | CLEO4 | CLEO5 |
|---|---|---|
| Reads invalid string as success | ✅ Skips param, condition = false | |
| Value 0x80000000 ambiguity (INT) | ✅ Condition = true | |
| Preserved original on failure (INT) | ❌ No - overwrites with sentinel | ✅ Yes - skips param (default mode) |
SAxVCxLC — CJ starts with maximum stats.
Cause: Missing UnlockedSA parameter in SAxVCxLC.ini and no safeguard check in the mod code.
Fix: Add the following line to the INI file to disable the stat boost:
UnlockedSA = 0
This restores normal stat progression.