Project

General

Profile

Bug #854367

sdl2: utf8_strlen() miscalculates multibyte characters

Added by Marko Lindqvist 6 months ago. Updated 6 months ago.

Status:
Closed
Priority:
Normal
Category:
gui-sdl2
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

utf8_strlen() checks if a byte value is >= 128 to see if it's beginning of a multibyte character (has topmost bit set). However, the type of the checked byte is 'signed char' and thus result of that comparison is always false (max value for signed char is 127, topmost bit denotes negative value).

History

#2 Updated by Marko Lindqvist 6 months ago

  • Status changed from Resolved to Closed
  • Assignee set to Marko Lindqvist

Also available in: Atom PDF