SStrToFloat
function · storm · primitive
- Address
0x64aaa0· 434 bytes, up to0x64ac51- Signature
float __stdcall (const char *string)- Meaning
- Reads a decimal float: an optional minus, digits, a fraction and an exponent at 53 bits; 0.0 and error 0x57 for null
- Confidence
- verified, proof two
- Name from
- the community database (idb)
- Finding
- storm/strings#float-grammar
- Test
storm::sstrtofloat_whole
Finding: Float grammar in storm: string conversions
SStrToFloat(s) (0x64aaa0) reads one optional -, with no space skipped and no +; then
decimal digits; then a . and decimal digits; then an exponent; each part optional, and the read
stops at the first byte that fits none. A . with no digit after it is still passed, so 1.e2 reads
as 1e2. The exponent is e or E, one optional +, and SStrToInt of the rest, so 1e+-2 reads
as 1e-2. 12 and +12 read 0, .5 as 0.5, - as −0.0, and a null s sets error 0x57 and
answers 0.0. A digit is a byte, sign-extended, minus '0' below 10 unsigned.
The derivation is in the doc.
Callers 45
- MouseSpeedCallback client
- GammaCallback client
- PortCommand unassigned
- CCommand_WorldTeleport unassigned
- SetRawPosCommand unassigned
- 0x445510 unassigned
- MusicVolumeHandler sound
- SoundVolumeHandler sound
- MasterVolumeHandler sound
- AmbienceVolumeHandler sound
- ValidateNearestDistance ui
- UiScaleChanged ui
- LoadFlatSavedVariables ui
- CheckCVarRange uicamera
- CCamera::CCamera uicamera
- CCamera::LoadSettings uicamera
- CCamera::ResetView uicamera
- CCamera::ViewIsUncustomised uicamera
- ConsoleCommand::CharSpacing console
- ConsoleCommand_FontSize console
- GxMultisampleQualityCallback console
- CVar::InternalSet cvar
- HandleDistCullOption cvar
- HandleTexLodBiasOption cvar
- ValidateFarClip terrain
- ValidateNearClip terrain
- HandleParticleDensityOption cvar
- HandleUnitDrawDistOption cvar
- ValidateHorizonFarClip terrain
- XmlReadValue ui
- XmlReadDimension ui
- XmlReadInset ui
- XmlReadColor ui
- CSimpleFrame::LoadXML ui
- CSimpleModel::LoadXML ui
- CSimpleTexture::LoadXML ui
- CSimpleFontString::LoadXML ui
- CSimpleEditBox::LoadXML ui
- CSimpleStatusBar::LoadXML ui
- CFontObject::LoadXML ui
- CSimpleMessageFrame::LoadXML ui
- CSimpleMessageScrollFrame::LoadXML ui
- CSimpleSlider::LoadXML ui
- CSimpleHTML::AddImage ui
- EditBox::GetNumber ui
Callees 4
- BuildPow10TableOnce storm
- SStrToInt storm
- SErrSetLastError storm
- __CIpow crt
Calls and jumps by a bare address, from tables/calls.tsv.