Commit Graph

5 Commits (762a3468b24cd4496f872bb9ffa98601eb0e4b8e)

Author SHA1 Message Date
nirenjan ef4cbee127 fix: Handle malformed UTF-8 input in libx52util
The libx52util_convert_utf8_string function manually converts the UTF-8
string into the character map supported by the X52/X52Pro MFD. However,
there was a bug when handling malformed UTF-8 input. If the state
machine thinks it is at the start of a word and receives malformed UTF-8
input (between 0x80 and 0xC0), it will ignore the characters, but it
will not reset the entry to the map_root location, thereby causing
subsequent characters to be dropped.

This change ensures that the entry is reset to map_root[*input] after
skipping over an invalid UTF-8 sequence.
2026-03-08 20:25:29 -07:00
nirenjan 8d38c4d16b Fix Makefile to build on alternative make implementations
On some systems (notably FreeBSD), the make implementation makes a
distinction between $(builddir)/<path> and <path>, even when builddir is
`.`. This commit removes $(builddir) from all references to generated
files, so that these implementations don't fail. Keeping $(builddir)
causes older versions automake (1.15 and older) to generate a broken
Makefile.
2021-10-12 12:10:36 -07:00
nirenjan e968656672 Fix Cflags and add libx52util.pc 2021-08-03 12:53:26 -07:00
nirenjan ac68ee07e5 Use non-recursive Automake 2021-07-29 23:53:21 -07:00
nirenjan 34adeaec45 Move libx52util to top level 2021-07-29 21:47:07 -07:00