summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Angelacos <nangel@alpinelinux.org>2008-03-17 18:28:12 +0000
committerNathan Angelacos <nangel@alpinelinux.org>2008-03-17 18:28:12 +0000
commit8b71b1f62a9e7027d33b2a0987630c274f9c2f19 (patch)
tree7d936178f7bba516f432840940717f5d3d99abd0
parent984ea9219aeffc9bd4147df526c146315ceca0c0 (diff)
downloadhaserl-8b71b1f62a9e7027d33b2a0987630c274f9c2f19.tar.bz2
haserl-8b71b1f62a9e7027d33b2a0987630c274f9c2f19.tar.xz
Care for single character checkboxes
-rw-r--r--configure.ac2
-rw-r--r--src/haserl.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index 2cc54da..a7b0c46 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,5 @@
# Process this file with autoconf to produce a configure script.
-AC_INIT([haserl],[0.9.23_rc3],[Nathan Angelacos <nangel@users.sourceforge.net>],[haserl])
+AC_INIT([haserl],[0.9.23_rc4],[Nathan Angelacos <nangel@users.sourceforge.net>],[haserl])
AM_INIT_AUTOMAKE([haserl],[$PACKAGE_VERSION])
# Checks for programs.
diff --git a/src/haserl.c b/src/haserl.c
index fbdf9e7..9769fda 100644
--- a/src/haserl.c
+++ b/src/haserl.c
@@ -237,7 +237,7 @@ myputenv (list_t * cur, char *str, char *prefix)
}
/* does the value already exist? */
- len = keylen + strlen (prefix) + 2;
+ len = keylen + strlen (prefix) + 1;
while (cur != NULL)
{
if (memcmp (cur->buf, entry, len) == 0)
@@ -247,8 +247,8 @@ myputenv (list_t * cur, char *str, char *prefix)
/* if an array, create a new string with this
* value added to the end of the old value(s)
*/
- temp = xmalloc (strlen (cur->buf) + len);
- memmove (temp, cur->buf, strlen (cur->buf));
+ temp = xmalloc (strlen (cur->buf) + len + 1);
+ memmove (temp, cur->buf, strlen (cur->buf) + 1);
strcat (temp, "\n");
strcat (temp, str + keylen + 3);
free (entry);