mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-09-15 07:28:16 +08:00
Fix linear_gradient float precision bug.
This was reported by: https://github.com/ArthurSonzogni/FTXUI/issues/998 Indeed, the `t` interpolation factor, which is itself interpolated might become slightly larger than 1.0. This is due to the float precision. This was supposedly handled, but there was an off-by-one error in the check. Along the way, fix a bug found by a fuzzer. Bug: https://github.com/ArthurSonzogni/FTXUI/issues/998 Fixed: https://github.com/ArthurSonzogni/FTXUI/issues/998
This commit is contained in:

committed by
ArthurSonzogni

parent
15587dad01
commit
d75108e960
@@ -83,10 +83,6 @@ function(ftxui_set_options library)
|
||||
target_compile_options(${library} PRIVATE "-Wpedantic")
|
||||
target_compile_options(${library} PRIVATE "-Wshadow")
|
||||
target_compile_options(${library} PRIVATE "-Wunused")
|
||||
|
||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
target_compile_options(${library} PRIVATE "-Wuseless-cast")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
@@ -13,6 +13,7 @@ add_executable(ftxui-tests
|
||||
src/ftxui/component/component_test.cpp
|
||||
src/ftxui/component/component_test.cpp
|
||||
src/ftxui/component/container_test.cpp
|
||||
src/ftxui/component/dropdown_test.cpp
|
||||
src/ftxui/component/hoverable_test.cpp
|
||||
src/ftxui/component/input_test.cpp
|
||||
src/ftxui/component/menu_test.cpp
|
||||
|
Reference in New Issue
Block a user