summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/main.c b/src/main.c
index 50d55b9..a625288 100644
--- a/src/main.c
+++ b/src/main.c
@@ -156,23 +156,20 @@ int main(int argc, char* argv[]) {
srand((unsigned)seed);
cursor = set;
- while(len > 0) {
- // Randomly select the number of character sets to advance through (max 10)
+ while((len--) > 0) {
+ // Randomly select the number of character sets to advance through
int i = rand() % 10;
- while(i > 0) {
+ while((i--) > 0) {
// Loop
- if(!cursor->next) {
+ if(!cursor->next)
cursor = set;
- } else {
+ else
cursor = cursor->next;
- }
- i--;
}
// Randomly select an integer within the set size
int rc = rand() % cursor->count; // Random char within set
printf("%lc", cursor->chars[rc]);
- len--;
}
printf("\n");

Generated by cgit