From 7fc409eecc199e1e81418a86c3b5ed214ad7d809 Mon Sep 17 00:00:00 2001 From: "ntfs.hard" Date: Mon, 30 Mar 2020 01:32:23 +0300 Subject: [PATCH] bitwise on boolean --- SPIRV/hex_float.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SPIRV/hex_float.h b/SPIRV/hex_float.h index 905b21a4..8be8e9f7 100644 --- a/SPIRV/hex_float.h +++ b/SPIRV/hex_float.h @@ -784,8 +784,8 @@ inline std::istream& ParseNormalFloat(std::istream& is, bool negate_value, if (val.isInfinity()) { // Fail the parse. Emulate standard behaviour by setting the value to // the closest normal value, and set the fail bit on the stream. - value.set_value((value.isNegative() | negate_value) ? T::lowest() - : T::max()); + value.set_value((value.isNegative() || negate_value) ? T::lowest() + : T::max()); is.setstate(std::ios_base::failbit); } return is;