Commit 4be2e4d
Replace game's CRT function call in floating point number INI parser (#1973)
Attempts to address one of the issues presented in #1970 by working
around the changes introduced in
9c8bd9e by replacing calling game's CRT
functions. `sscanf(_s)` produces results with different precision from
game's `sscanf`. Using `strtod` and casting the result double into float
appears to be more accurate but whether or not these results are
consistent across different systems I do not know.
This merely addresses the floating point number parsing in Phobos (which
also replaces game's floating point number INI parser, see hook
`INIClass_ReadDouble_Overwrite` in `Misc\Hooks.INIInheritance.cpp`) and
does not in any way involve any potential root causes for why calling
game's CRT functions is problematic in the first place.
---------
Co-authored-by: Kerbiter <crabiter@vivaldi.net>1 parent fcda09f commit 4be2e4d
2 files changed
+28
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
554 | 554 | | |
555 | 555 | | |
556 | 556 | | |
| 557 | + | |
557 | 558 | | |
558 | 559 | | |
559 | 560 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
39 | 38 | | |
40 | 39 | | |
41 | 40 | | |
| |||
261 | 260 | | |
262 | 261 | | |
263 | 262 | | |
| 263 | + | |
| 264 | + | |
264 | 265 | | |
265 | | - | |
266 | | - | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
267 | 271 | | |
268 | | - | |
269 | | - | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
270 | 278 | | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | | - | |
279 | | - | |
| 279 | + | |
280 | 280 | | |
281 | | - | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
282 | 286 | | |
283 | 287 | | |
284 | 288 | | |
285 | 289 | | |
286 | 290 | | |
287 | 291 | | |
| 292 | + | |
288 | 293 | | |
289 | 294 | | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
290 | 301 | | |
291 | 302 | | |
292 | | - | |
| 303 | + | |
293 | 304 | | |
294 | 305 | | |
295 | 306 | | |
| |||
0 commit comments