Opened 5 years ago

Closed 5 years ago

#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


compiler flags:

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 5 years 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.