summaryrefslogtreecommitdiffstats
path: root/pb_decode.c
diff options
context:
space:
mode:
Diffstat (limited to 'pb_decode.c')
-rw-r--r--pb_decode.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/pb_decode.c b/pb_decode.c
index 8e01fd7a..c9652afb 100644
--- a/pb_decode.c
+++ b/pb_decode.c
@@ -80,6 +80,9 @@ pb_istream_t pb_istream_from_buffer(uint8_t *buf, size_t bufsize)
stream.callback = &buf_read;
stream.state = buf;
stream.bytes_left = bufsize;
+#ifndef PB_NO_ERRMSG
+ stream.errmsg = NULL;
+#endif
return stream;
}