Not accepting "%f" in ccall(:sscanf, args...)?

Test on Windows 10 19042.662, Julia version 1.5.3 (2020-11-09).
Code below works.

u,v,w= Ref{Int32}(0),Ref{Int32}(0),Ref{Int32}(0)
ccall(:sscanf, Int, (Ptr{UInt8}, Ptr{UInt8}, Ref{Int32}, Ref{Int32}, Ref{Int32}), "1 2 3", "%d %d %d", u, v, w)

Code below doesn’t work.

u,v,x= Ref{Int32}(0),Ref{Int32}(0),Ref{Float32}(0)
ccall(:sscanf, Int, (Ptr{UInt8}, Ptr{UInt8}, Ref{Float32}, Ref{Int32}, Ref{Int32}), "1.0 2 3", "%f %d %d", x, u, v) # 0
ccall(:sscanf, Int, (Ptr{UInt8}, Ptr{UInt8}, Ref{Int32}, Ref{Float32}, Ref{Int32}), "1 2.0 3", "%d %f %d", u, x, v) # 1
ccall(:sscanf, Int, (Ptr{UInt8}, Ptr{UInt8}, Ref{Int32}, Ref{Int32}, Ref{Float32}), "1 2 3.0", "%d %d %f", u, v, x) # 2

Edit my post again. On Ubuntu 18.04.5 code above works! All returns “3” and “x” are correctly set.

Try:

u,v,x= Ref{Int32}(0),Ref{Int32}(0),Ref{Float32}(0)

ccall(:sscanf, Cint, (Ptr{UInt8}, Ptr{UInt8}, Ptr{Cvoid}...), "1.0 2 3", "%f %d %d", x, u, v)
x[] == 1.0 && u[] == 2 && v[] == 3 && println("Test 1 works")
ccall(:sscanf, Cint, (Ptr{UInt8}, Ptr{UInt8}, Ptr{Cvoid}...), "1 2.0 3", "%d %f %d", u, x, v)
u[] == 1 && x[] == 2.0 && v[] == 3 && println("Test 2 works")
ccall(:sscanf, Cint, (Ptr{UInt8}, Ptr{UInt8}, Ptr{Cvoid}...), "1 2 3.0", "%d %d %f", u, v, x)
u[] == 1 && v[] == 2 && x[] == 3.0 && println("Test 3 works")

This seems to work on my linux box.

Thx for your cleaner code, but my Julia on Windows 10 still can’t deal with “%f”, even using your code.