Oops, typoed #ifdef; again fixing previous commit.
[apps/agl-service-can-low-level.git] / pb_decode.c
index c9652af..7c68b5a 100644 (file)
@@ -225,6 +225,10 @@ bool checkreturn pb_make_string_substream(pb_istream_t *stream, pb_istream_t *su
 void pb_close_string_substream(pb_istream_t *stream, pb_istream_t *substream)
 {
     stream->state = substream->state;
+
+#ifndef PB_NO_ERRMSG
+    stream->errmsg = substream->errmsg;
+#endif
 }
 
 /* Iterator for pb_field_t list */