-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix undefined in core-test and printf-test
1. The change in include/fmt/core.h fixes "shift exponent -4 is negative" in PrintfTest.InvalidArgIndex `do_get` is called with index -1 when `basic_printf_context.arg` is called with id 4294967295 when basic_printf_context::get_arg subtracts 1 from arg_index 0 in the format string "%0$d". 2. The change in test/core-test.cc fixes "reference binding to null pointer" in BufferTest.Ctor buffer.operator[] attempts to return a reference to `buffer.ptr_[0]` when `ptr_` in `mock_buffer<int> buffer` is null. 2. The change in test/printf-test.cc fixes "signed integer overflow" in PrintfTest.Length This occurs in `TestLength<long long>("ll")`, since its minimum value minus one does not fit in long long.
- Loading branch information
Showing
3 changed files
with
5 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters