diff options
| author | Mattias Andrée <maandree@kth.se> | 2021-04-06 03:20:43 +0200 |
|---|---|---|
| committer | Mattias Andrée <maandree@kth.se> | 2021-04-06 03:20:43 +0200 |
| commit | 3fbe6edb3f2250fcf494e70105039a4f32c52066 (patch) | |
| tree | 544ccc9d74fcf15ec9fb23bb27818b355f7b6f86 /dice.c | |
| parent | m + Add timer (diff) | |
| download | pdatools-3fbe6edb3f2250fcf494e70105039a4f32c52066.tar.gz pdatools-3fbe6edb3f2250fcf494e70105039a4f32c52066.tar.bz2 pdatools-3fbe6edb3f2250fcf494e70105039a4f32c52066.tar.xz | |
Use libsimple instead of libcore
Signed-off-by: Mattias Andrée <maandree@kth.se>
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; |
