Skip to content
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

Visual studio 2017 format locale number string got exception #905

Closed
Joe-Yeh opened this issue Oct 10, 2018 · 3 comments
Closed

Visual studio 2017 format locale number string got exception #905

Joe-Yeh opened this issue Oct 10, 2018 · 3 comments

Comments

@Joe-Yeh
Copy link

Joe-Yeh commented Oct 10, 2018

the following code in the microsoft visual studio 2017 got exception

unsigned int nValu1=0xFFFFFFFF;
fmt::print("{:n}",nValu1);

@vitaut
Copy link
Contributor

vitaut commented Oct 11, 2018

What {fmt} library version do you use and what was the exception message?

@Joe-Yeh
Copy link
Author

Joe-Yeh commented Oct 11, 2018

  1. {{fmt}} library version ==> #define FMT_VERSION 50201
  2. exception point ==> in format.h line 1073 => return internal::copy_str(buffer, buffer + num_digits, out);
  3. exception data ==> Run-Time Check Failure Compiling errors VC2010 , QT4.8 #2 - Stack around the variable 'buffer' was corrupted. occurred
  4. seems allocated working buffer is not enough.

@vitaut
Copy link
Contributor

vitaut commented Oct 13, 2018

Good catch. Fixed in ddd7caf, thanks!

@vitaut vitaut closed this as completed Oct 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants