summaryrefslogtreecommitdiff
path: root/commands.c
diff options
context:
space:
mode:
Diffstat (limited to 'commands.c')
-rw-r--r--commands.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/commands.c b/commands.c
index d0d6d02..0938ee2 100644
--- a/commands.c
+++ b/commands.c
@@ -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)