Here's some code from the Jenkins CI project (one of their official plugins, to be precise) that would have thrown an assertion for "windows 9" (which wouldn't have had a version starting with "4.1"), and when assertions were disabled would have identified it as windows 98.
if (name.startsWith("windows")) {
name = "windows";
if (name.startsWith("windows 9")) {
if (version.startsWith("4.0")) {
version = "95";
} else if (version.startsWith("4.9")) {
version = "me";
} else {
assert version.startsWith("4.1");
version = "98";
}
Nah, that's a bug. Though it doesn't really invalidate the comment's point, since main source of the bug is just reusing the name variable, so the "windows 9" bug would still exist even if that one were fixed.
138
u/[deleted] Aug 20 '20 edited Aug 20 '20
That's an anecdote, ironically originated from another reddit comment.
Windows 95 and 98 reported itself as 3.95 and 3.98 to remain backwards compatible with windows 3 apps. So that prefix check never would have worked.