# HG changeset patch # User Paper <37962225+mrpapersonic@users.noreply.github.com> # Date 1667160493 14400 # Node ID 677f84ada0824bb41399bab30b7b055e70a79851 # Parent 48eea72be3388d019ae71885db77c9bd7d429590 Update win95kggui.c committer: GitHub diff -r 48eea72be338 -r 677f84ada082 win95kggui/src/win95kggui.c --- a/win95kggui/src/win95kggui.c Wed Oct 26 19:49:00 2022 -0400 +++ b/win95kggui/src/win95kggui.c Sun Oct 30 16:08:13 2022 -0400 @@ -62,8 +62,8 @@ } int win95_suffix(bool is_oem) { - int first_digits, last_digit, second_segment = 5; - while (get_sum(second_segment) % 7 != 0) { + int first_digits, last_digit, second_segment; + do { if (is_oem == false) { first_digits = rand() % 999999; } else { @@ -74,20 +74,19 @@ last_digit = rand() % 9; } second_segment = CONCAT_INTS(first_digits, last_digit); - } + } while (get_sum(second_segment) % 7 != 0); return second_segment; } int office_prefix() { - int new_site = 0; - int ez_pwned = 0; - while (CONCAT_INTS(new_site, ez_pwned) == 0) { + int new_site, ez_pwned; + do { new_site = rand() % 99; ez_pwned = (new_site % 10) + 2; if (ez_pwned >= 10) { ez_pwned -= 10; } - } + } while (CONCAT_INTS(new_site, ez_pwned) == 0); return CONCAT_INTS(new_site, ez_pwned); }