#15617 closed defect (fixed)

src/stc/PlatWX.cpp - non UNICODE

Reported by: m32 Owned by:
Priority: critical Milestone:
Component: wxStyledText Version: 2.9.5
Keywords: stc scintilla Cc:
Blocked By: Blocking:
Patch: no

Description

compiler flags:
wxUSE_UNICODE = 0
wxUSE_STD_CONTAINERS = 0

void SurfaceImpl::MeasureWidths(Font &font, const char *s, int len, XYPOSITION *positions) {
...
memcpy(positions, tpos.begin(), len * sizeof(int));

positions has type XYPOSITION (float) so memcpy copies values without conversion

Change History (1)

comment:1 Changed 13 months ago by VZ

  • Resolution set to fixed
  • Status changed from new to closed

(In [75097]) Fix MeasureWidths() in wxSTC in non-Unicode build.

Integer values must be converted to floats instead of just using memcpy().

Closes #15617.

Note: See TracTickets for help on using tickets.