diff --git a/include/fmt/format-inl.h b/include/fmt/format-inl.h index bb4b8423..7c916176 100644 --- a/include/fmt/format-inl.h +++ b/include/fmt/format-inl.h @@ -765,11 +765,11 @@ void sprintf_format(Double value, internal::buffer& buf, if (*p == '0') ++p; const char* end = buf.data() + n; while (p != end && *p >= '1' && *p <= '9') ++p; - char* start = p; + char* where = p; while (p != end && *p == '0') ++p; if (p == end || *p < '0' || *p > '9') { - if (p != end) std::memmove(start, p, to_unsigned(end - p)); - n -= static_cast(p - start); + if (p != end) std::memmove(where, p, to_unsigned(end - p)); + n -= static_cast(p - where); } } }