]> granicus.if.org Git - python/commitdiff
long_to_decimal_string_internal() doesn't need to write the final NULL character
authorVictor Stinner <victor.stinner@gmail.com>
Thu, 4 Oct 2012 00:43:02 +0000 (02:43 +0200)
committerVictor Stinner <victor.stinner@gmail.com>
Thu, 4 Oct 2012 00:43:02 +0000 (02:43 +0200)
Objects/longobject.c

index 73413dd5afb3ae2b272275ce5c1f6c909c048550..24cf1a5f8fbb84dbb417ea798e0877699b10164c 100644 (file)
@@ -1651,7 +1651,6 @@ long_to_decimal_string_internal(PyObject *aa,
         else                                                          \
             p = (TYPE*)PyUnicode_DATA(str) + strlen;                  \
                                                                       \
-        *p = '\0';                                                    \
         /* pout[0] through pout[size-2] contribute exactly            \
            _PyLong_DECIMAL_SHIFT digits each */                       \
         for (i=0; i < size - 1; i++) {                                \