Project

General

Profile

« Previous | Next » 

Revision 3a425c76

Added by aycabta (aycabta .) almost 6 years ago

Fix alignment of a SHORT variable

typedef struct _COORD {
SHORT X;
SHORT Y; // I wanted to take this...
} COORD, *PCOORD;

typedef struct _CONSOLE_SCREEN_BUFFER_INFO {
COORD dwSize;
COORD dwCursorPosition; // ...of this one
WORD wAttributes; // But it's combined with first 2bytes of this
SMALL_RECT srWindow;
COORD dwMaximumWindowSize;
} CONSOLE_SCREEN_BUFFER_INFO;

If wAttributes has non-zero value, the code breaks.