PROTON-2426: [C] Fix off by one error in pn_quote_data
diff --git a/c/src/core/util.c b/c/src/core/util.c
index 18a9464..bed2a54 100644
--- a/c/src/core/util.c
+++ b/c/src/core/util.c
@@ -46,7 +46,7 @@
         dst[idx++] = c;
       } else {
         if (idx > 0) {
-          dst[idx - 1] = '\0';
+          dst[idx] = '\0';
         }
         return PN_OVERFLOW;
       }
@@ -55,7 +55,7 @@
         idx += sprintf(dst + idx, "\\x%.2x", c);
       } else {
         if (idx > 0) {
-          dst[idx - 1] = '\0';
+          dst[idx] = '\0';
         }
         return PN_OVERFLOW;
       }