mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-01 04:46:51 +08:00
[ocaml] fix GCS crash when using papgets
was due to the use of 'magic' instead of the proper function close #1823
This commit is contained in:
@@ -59,7 +59,7 @@ object (self)
|
||||
PC.property "color" color ]
|
||||
method update = fun (value : string) ->
|
||||
let renderer = fun x ->
|
||||
try sprintf (Obj.magic format) (float_of_string x) with _ -> x in
|
||||
try sprintf (Scanf.format_from_string format "%f") (float_of_string x) with _ -> x in
|
||||
text#set [`SIZE_POINTS size; `TEXT (renderer value); `FILL_COLOR color; `ANCHOR `NW]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user