diff options
Diffstat (limited to 'dice.c')
| -rw-r--r-- | dice.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -1,6 +1,5 @@ /* See LICENSE file for copyright and license details. */ #include "common.h" -#include <sys/random.h> /* TODO add support for up and down arrows to browse previous entries in the same session */ @@ -74,7 +73,7 @@ parse_dice(const char *s, struct die **dicep, size_t *ndicep) if (!isdigit(*s) && *s != '-' && *s != 'd' && *s != 'D') goto invalid; - dice = erealloc2(dice, ++ndice, sizeof(*dice)); + dice = ereallocn(dice, ++ndice, sizeof(*dice), 0); die = &dice[ndice - 1]; die->count = 1; die->min = 1; |
