projects
/
yaz-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
36d8976
)
odr_prepend: zero length prefix ignored
author
Adam Dickmeiss
<adam@indexdata.dk>
Thu, 20 Dec 2012 10:59:55 +0000
(11:59 +0100)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Thu, 20 Dec 2012 10:59:55 +0000
(11:59 +0100)
src/odr_util.c
patch
|
blob
|
history
diff --git
a/src/odr_util.c
b/src/odr_util.c
index
17d1582
..
58b60cb
100644
(file)
--- a/
src/odr_util.c
+++ b/
src/odr_util.c
@@
-107,9
+107,9
@@
char *odr_prepend(ODR o, const char *prefix, const char *old)
char *res = (char*) odr_malloc (o, olen + plen + 2);
*res = '\0';
- if (prefix != 0)
+ if (plen > 0)
strcpy (res, prefix);
- if (prefix != 0 && old != 0)
+ if (plen > 0 && old != 0)
strcat (res, "/");
if (old !=0)
strcat (res, old);