We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 227f8d5 commit 90fabdaCopy full SHA for 90fabda
src/core/n-oid.c
@@ -82,13 +82,14 @@
82
if (!(oid[i] & 0x80)) {
83
/* Last byte */
84
ret = snprintf(p, n, ".%u", value);
85
- if (ret >= n) {
+ if (ret < 0) return R_ARG1; // error!
86
+ if ((size_t)ret >= n) {
87
Extend_Series(out, (REBLEN)(ret - n + 1)); // may reallocate p!
88
p = SERIES_DATA(out) + SERIES_TAIL(out);
89
n = SERIES_AVAIL(out);
90
- }
91
- if (ret < 0) return R_ARG1; // error!
92
+ }
93
SERIES_TAIL(out) += ret;
94
n -= (size_t)ret;
95
p += (size_t)ret;
0 commit comments