-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issues with fmt::format_to_n() #1056
Labels
Comments
Seems like the output iterator is not incremented here: *reserve(1) = value; Changing this line to auto&& it = reserve(1); *it++ = value; fixes the issue, but I haven't run any other tests. |
Has been changed in f6fd38b#diff-93ae8f33d84a6b0b08a62dc9a50f6b85L2344 |
@abolz, that's probably it, thanks for investigating. Could you by any chance submit a PR with a small regression test? |
Yes, sure. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
After running the following code
result.size
is 0 when it should be 1.Also, when changing the format string from
"{}"
to"{} "
(adding a single space),result.size
is 1 when it should be 2, and the contents ofbuffer
is" "
(a single space) following garbage as it's not null-terminated.The {fmt} code running is from commit a977577 and built with Visual Studio 2017 15.9.5 v141 toolset.
The text was updated successfully, but these errors were encountered: