changeset 111:677f84ada082

Update win95kggui.c committer: GitHub <noreply@github.com>
author Paper <37962225+mrpapersonic@users.noreply.github.com>
date Sun, 30 Oct 2022 16:08:13 -0400
parents 48eea72be338
children 5a70e243557a
files win95kggui/src/win95kggui.c
diffstat 1 files changed, 6 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- 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);
 }