X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/putty/blobdiff_plain/0c33d3a6483e2493a29d662afc79a8c86dc6dfc5..edb548cd8283b5e3f680a0a8b641f9afb12d4ba4:/windows/window.c diff --git a/windows/window.c b/windows/window.c index b477d6ae..0ae88cc1 100644 --- a/windows/window.c +++ b/windows/window.c @@ -168,7 +168,7 @@ struct agent_callback { #define FONT_OEMUND 0x22 #define FONT_OEMBOLDUND 0x23 -#define FONT_MAXNO 0x2F +#define FONT_MAXNO 0x40 #define FONT_SHIFT 5 static HFONT fonts[FONT_MAXNO]; static LOGFONT lfont; @@ -4805,7 +4805,7 @@ void palette_set(void *frontend, int n, int r, int g, int b) { if (n >= 16) n += 256 - 16; - if (n > NALLCOLOURS) + if (n >= NALLCOLOURS) return; real_palette_set(n, r, g, b); if (pal) {