fix-nan-on-win11.patch 691 B

123456789101112131415161718
  1. diff --git a/third_party/upb/upb/message/internal/message.c b/third_party/upb/upb/message/internal/message.c
  2. index 265d30d..afc6e51 100644
  3. --- a/third_party/upb/upb/message/internal/message.c
  4. +++ b/third_party/upb/upb/message/internal/message.c
  5. @@ -17,9 +17,9 @@
  6. // Must be last.
  7. #include "upb/port/def.inc"
  8. -const float kUpb_FltInfinity = INFINITY;
  9. -const double kUpb_Infinity = INFINITY;
  10. -const double kUpb_NaN = NAN;
  11. +const float kUpb_FltInfinity = (float)(1.0 / 0.0);
  12. +const double kUpb_Infinity = 1.0 / 0.0;
  13. +const double kUpb_NaN = 0.0 / 0.0;
  14. bool UPB_PRIVATE(_upb_Message_Realloc)(struct upb_Message* msg, size_t need,
  15. upb_Arena* a) {