diff options
author | Jedidiah Barber <contact@jedbarber.id.au> | 2025-01-22 15:40:12 +1300 |
---|---|---|
committer | Jedidiah Barber <contact@jedbarber.id.au> | 2025-01-22 15:40:12 +1300 |
commit | d6458841c9134a3b6d8ca260766fca64a72740aa (patch) | |
tree | 0cd2abe591b32ad11e46598785a9227dc59f5b67 /body | |
parent | b4438b2fbe895694be98e6e8426103deefc51448 (diff) |
Arc testing program and Valuator Format subprogram bugfix
Diffstat (limited to 'body')
-rw-r--r-- | body/fltk-widgets-valuators.adb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/body/fltk-widgets-valuators.adb b/body/fltk-widgets-valuators.adb index 4b8db3f..0cf8d65 100644 --- a/body/fltk-widgets-valuators.adb +++ b/body/fltk-widgets-valuators.adb @@ -198,13 +198,16 @@ package body FLTK.Widgets.Valuators is pragma Assert (Userdata /= Null_Pointer); Ada_Obj := Valuator_Convert.To_Pointer (Storage.To_Address (Userdata)); declare + -- God this whole Format method is sketchy as hell. + -- ...what? This is the area to declare things and that needed declaring. String_Result : String := Ada_Obj.Format; begin if String_Result'Length <= FLTK.Buffer_Size then - Interfaces.C.Strings.Update (Buffer, 0, String_Result); + Interfaces.C.Strings.Update (Buffer, 0, Interfaces.C.To_C (String_Result), False); return String_Result'Length; else - Interfaces.C.Strings.Update (Buffer, 0, String_Result (1 .. Buffer_Size)); + Interfaces.C.Strings.Update + (Buffer, 0, Interfaces.C.To_C (String_Result (1 .. Buffer_Size)), False); return Interfaces.C.int (FLTK.Buffer_Size); end if; end; |