which/which-2.14-broken.patch

15 lines
430 B
Diff
Raw Normal View History

--- which-2.14/tilde/tilde.c.orig Mon Dec 9 18:52:19 2002
+++ which-2.14/tilde/tilde.c Mon Dec 9 18:58:09 2002
@@ -182,7 +182,10 @@
int result_size, result_index;
result_index = result_size = 0;
- if (result = strchr (string, '~'))
+
+ result = strchr (string, '~');
+
+ if (!result)
result = xmalloc (result_size = (strlen (string) + 16));
else
result = xmalloc (result_size = (strlen (string) + 1));