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:
59e8e36
)
Fixed stupid bug in str2oid routine.
author
Sebastian Hammer
<quinn@indexdata.com>
Mon, 3 Jun 1996 09:46:31 +0000
(09:46 +0000)
committer
Sebastian Hammer
<quinn@indexdata.com>
Mon, 3 Jun 1996 09:46:31 +0000
(09:46 +0000)
odr/odr_util.c
patch
|
blob
|
history
diff --git
a/odr/odr_util.c
b/odr/odr_util.c
index
ed3b07e
..
cfa28cc
100644
(file)
--- a/
odr/odr_util.c
+++ b/
odr/odr_util.c
@@
-57,10
+57,11
@@
Odr_oid *odr_getoidbystr(ODR o, char *str)
return 0;
while ((p = strchr(p, '.')))
num++, p++;
- ret = odr_malloc(o, sizeof(*ret)*num);
+ ret = odr_malloc(o, sizeof(*ret)*(num + 1));
p = str;
do
ret[i++] = atoi(p);
- while ((p = strchr(p, '.')));
+ while ((p = strchr(p, '.')) && ++p);
+ ret[i] = -1;
return ret;
}