Hacker News new | past | comments | ask | show | jobs | submit login

That's a crazy amount of work and a crazy amount of quirks indeed. Very much illustrates a mindset where the user is at fault if they provide bad input - and development effort for everything was multiplied compared to today. In 1985, of course, nobody cared about things like security from untrusted inputs, and reproducible builds.

My favourite bug from this list is that the compiler expands tabs to spaces in string literals and puts them at tab stops based on the string literal's horizontal position in the source file.

I think that being able to directly define resource type 6 is not a bug. You got exactly what you asked for - an invalid resource. Crashing when loading it isn't a bug, either.

I suppose that style flag arguments are parsed as |-separated lists of numeric or NOT expressions, rather than single expressions where | serves as bitwise-or.

> If the truncated value is >= 0x80, add 0xFF00 and write the result as a little-endian u32. If the truncated value is < 0x80 but not zero, write the value as a little-endian u32.

This is sign-extension: s8 -> s16 -> u16 -> u32. The examples below this also seem to have reversed the order of the input byte and the FF.

Visual C++ 6, at least, includes a toolbar resource editor. IIRC it shows the toolbar metadata and the bitmap together in one editor, and you edit each button's image individually even though they are concatenated into one bitmap in the resource file.

"GROUPBOX can only be used in DIALOGEX" might refer to some limitation other than the resource compiler. For example, perhaps Windows versions that don't support DIALOGEX also don't support GROUPBOX.

A lot of them could be caused by memory safety errors. For example the fact that "1 ICON {" treats "ICON" as the filename is probably because the tokenizer doesn't set the Microsoft equivalent of yytext for tokens where it's not supposed to be relevant. Maybe it would even crash (null pointer) if { could be the first token (which it can't).






Appreciate the added context!

> |-separated lists of numeric or NOT

Note that | is not the only operator that can be used in style parameters, & + and - are all allowed too.

> perhaps Windows versions that don't support DIALOGEX also don't support GROUPBOX

Seems possible for sure. From [1]:

> The 16-bit extended dialog template is purely historical. The only operating systems to support it were the Windows 95/98/Me series.

[1] https://devblogs.microsoft.com/oldnewthing/20040622-00/?p=38...

> The examples below this also seem to have reversed the order of the input byte and the FF.

Good catch, fixed




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: