forked from pool/nodejs-electron
- New upstream release 21.2.1 * Fixed spurious promise rejection in webContents.loadURL when navigating to a hash. * Updated Chromium to 106.0.5249.165. - Add electron-version-from-env.patch to fix build error - Add upstreamable patches fixing various erroneous C++ constructs * ipcz-safe_math-Wuninitialized.patch * passwords_counter-Wsubobject-linkage.patch * static_constructors-Wstrict-aliasing.patch * vector_math_impl-Wstrict-aliasing.patch * webgl_image_conversion-Wstrict-aliasing.patch * xr_cube_map-Wstrict-aliasing.patch OBS-URL: https://build.opensuse.org/request/show/1032854 OBS-URL: https://build.opensuse.org/package/show/devel:languages:nodejs/nodejs-electron?expand=0&rev=45
22 lines
822 B
Diff
22 lines
822 B
Diff
--- src/third_party/blink/renderer/modules/xr/xr_cube_map.cc.old 2022-10-20 19:00:30.045381900 +0200
|
|
+++ src/third_party/blink/renderer/modules/xr/xr_cube_map.cc 2022-10-29 22:07:43.236052800 +0200
|
|
@@ -4,6 +4,8 @@
|
|
|
|
#include "third_party/blink/renderer/modules/xr/xr_cube_map.h"
|
|
|
|
+#include <cstring>
|
|
+
|
|
#include "base/cxx17_backports.h"
|
|
#include "device/vr/public/mojom/vr_service.mojom-blink.h"
|
|
#include "third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.h"
|
|
@@ -19,7 +21,8 @@
|
|
// This is an inversion of FloatToHalfFloat in ui/gfx/half_float.cc
|
|
float HalfFloatToFloat(const uint16_t input) {
|
|
uint32_t tmp = (input & 0x7fff) << 13 | (input & 0x8000) << 16;
|
|
- float tmp2 = *reinterpret_cast<float*>(&tmp);
|
|
+ float tmp2;
|
|
+ std::memcpy(&tmp2, &tmp, 4);
|
|
return tmp2 / 1.9259299444e-34f;
|
|
}
|
|
|