Comments (3)
I was able to patch it with this horrible code. If for some reason you like it, I can make a pull request.
diff --git a/format.cc b/format.cc
index f57c0db..8e8cd42 100644
--- a/format.cc
+++ b/format.cc
@@ -440,8 +440,12 @@ class fmt::internal::ArgFormatter :
default:
internal::ReportUnknownType(spec_.type_, "char");
}
- }
- if (spec_.align_ == ALIGN_NUMERIC || spec_.flags_ != 0)
+ }
+ else {
+ if(spec_.align_ == ALIGN_NUMERIC)
+ throw FormatError("invalid format specifier for char");
+ }
+ if (spec_.flags_ != 0)
throw FormatError("invalid format specifier for char");
typedef typename fmt::BasicWriter<Char>::CharPtr CharPtr;
CharPtr out = CharPtr();
from fmt.
Fixed, sorry for the inconvenience (I forgot to test the previous fix and of course it was not working as expected).
from fmt.
Thanks again!
from fmt.
Related Issues (20)
- FMT_STATIC_THOUSANDS_SEPARATOR broken in 10.0.0 HOT 2
- Warning stringop-overflow with gcc-10.3.0 HOT 2
- fmt/ranges.h incompatible with Eigen 3.4 HOT 6
- Custom thousand separator HOT 1
- Formatting nested custom types with indentation HOT 1
- Request to add println to fmt HOT 2
- core.h does not exist. HOT 1
- Feature request: `print` overload for `char8_t` in `xchar.h` suggested HOT 4
- PVS-Studio analysis of fmt discovered some issues HOT 1
- format_as is not working with fmt::streamed HOT 1
- Compile error for simple formatting program HOT 1
- Feature Request: Convert Format String to RegEx HOT 1
- fmt/std.h happy with c++20, unhappy with c++23 HOT 2
- feature request: support for emphasis and coloring in print and println HOT 1
- support C++23 character range formatting HOT 1
- chrono locale format code has some bug when using RHEL gcc on CentOS 7.6 to compile
- Dynamic precision for `nested_formatter` does not work
- Error: expected unqualified-id before numeric constant
- Is C++ 20 a minimum requirement to build the lib? HOT 10
- Proposal to add syntax for removing leading zeros in time formatting HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fmt.