aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2013-08-21 22:44:44 +0200
committerMattias Andrée <maandree@operamail.com>2013-08-21 22:44:44 +0200
commit18773b6077e77b570cdd6d4dc32e5ab179a0713a (patch)
treee7cab5aea2d6248356f4bf8ca0469ee581b8d8a6 /src
parentderp (diff)
downloadargparser-18773b6077e77b570cdd6d4dc32e5ab179a0713a.tar.gz
argparser-18773b6077e77b570cdd6d4dc32e5ab179a0713a.tar.bz2
argparser-18773b6077e77b570cdd6d4dc32e5ab179a0713a.tar.xz
mem fault
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src')
-rw-r--r--src/argparser.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/argparser.c b/src/argparser.c
index 7e9fff5..11be506 100644
--- a/src/argparser.c
+++ b/src/argparser.c
@@ -487,7 +487,7 @@ void args_opts_append(char* name, char* value)
else
{
long address = (long)(void*)values;
- values = (char**)realloc(values, size);
+ values = (char**)realloc(values, size * sizeof(char*));
*(values + size - 1) = value;
if ((long)(void*)values != address)
args_opts_put(name, values);