Skip to content

VIDEO_CURSOR_POSX should be 4-byte aligned #36

@Ryzee119

Description

@Ryzee119

There's instances in the cromwell code base of cursor offsets that are not aligned on 4 byte boundaries.
The font render code does not check for this and results in incorrect bytes being set in the framebuffer. In some cases it could even result in writing to areas outside of the frame buffer.

As a minimum, this function should check VIDEO_CURSOR_POSX is divisible by 4 and fix before passing the framebuffer pointers.

void BootVideoChunkedPrint(const char * szBuffer) {

The most prominent issue of this is the below comparisons in the Text menu titles. The colour should be purple.
Bad:
cromwell_bad

Cursor Positions Adjusted correctly:
cromwell_good

An example of bad cursor position is here. The above example was created by changing X cursor position to 72.

VIDEO_CURSOR_POSX=75;
VIDEO_CURSOR_POSY=125;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions