openbsd-ports/x11/windowmaker/patches/patch-WINGs_string_c
wilfried 886c0ab2bd wtokenfree does not free the first entry of an array
patch from Tobias Stoeckmann
2007-04-25 11:32:55 +00:00

21 lines
503 B
Plaintext

$OpenBSD: patch-WINGs_string_c,v 1.4 2007/04/25 11:32:55 wilfried Exp $
--- WINGs/string.c.orig Tue Oct 12 20:32:12 2004
+++ WINGs/string.c Thu Mar 15 20:00:31 2007
@@ -1,6 +1,6 @@
#include "wconfig.h"
-
+#include <assert.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
@@ -153,7 +153,7 @@ wtokenjoin(char **list, int count)
void
wtokenfree(char **tokens, int count)
{
- while (--count) wfree(tokens[count]);
+ while (count--) wfree(tokens[count]);
wfree(tokens);
}