diff options
Diffstat (limited to '')
-rw-r--r-- | commands.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -93,7 +93,7 @@ static struct pref_type_suff { }; int sus_command(struct string sender, struct string original_message, struct string to, uint64_t argc, struct string *argv) { - uint64_t index = random() % (sizeof(sus_strings)/sizeof(sus_strings[0])); + uint64_t index = (uint64_t)random() % (sizeof(sus_strings)/sizeof(sus_strings[0])); SEND(sus_strings[index].pref); if (sus_strings[index].type == 0) @@ -112,7 +112,7 @@ static struct command_def sus_command_def = { }; int cr_command(struct string sender, struct string original_message, struct string to, uint64_t argc, struct string *argv) { - uint64_t index = random() % (sizeof(cr_strings)/sizeof(cr_strings[0])); + uint64_t index = (uint64_t)random() % (sizeof(cr_strings)/sizeof(cr_strings[0])); SEND(cr_strings[index].pref); if (cr_strings[index].type == 0) |