Edit

kc3-lang/libxkbcommon/changes/api/+locale-dependent-floats.bugfix.md

Branch :

  • Browse

    Commit

  • Author : Pierre Le Marre
    Date : 2025-03-28 09:38:58
    Hash : 500b260b
    Message : xkbcomp: Fix parser failure on floating-point numbers Before this commit we used `strtold`, which depends on the locale. But the XKB syntax is fixed and uses a period as decimal separator. So ensure the syntax is correct without relying on `strtold` and truncate the result, as the parser does not use floating-point numbers.

  • changes/api/+locale-dependent-floats.bugfix.md
  • Fixed floating-point number parsing failling on locales that use a decimal
    separator different than the period `.`.
    
    Note that the issue is unlikely to happen even with such locales, unless
    *parsing* a keymap with a *geometry* component which contains floating-point
    numbers.
    
    Affected API:
    - `xkb_keymap_new_from_file()`,
    - `xkb_keymap_new_from_buffer()`,
    - `xkb_keymap_new_from_string()`.
    
    Unaffected API:
    - `xkb_keymap_new_from_names()`: none of the components loaded use
      floating-point number. libxkbcommon does not load *geometry* files.
    - `libxkbcommon-x11`: no such parsing is involved.