mirror of
https://github.com/termux/termux-packages
synced 2024-06-18 20:40:45 +00:00
c55303d60f
as a follow-up of commit 8f2c1b0fe4
.
Please always test on arm (32-bit) arch if you modify or delete it.
18 lines
770 B
Diff
18 lines
770 B
Diff
https://github.com/termux/termux-packages/issues/13594
|
|
|
|
Please always test on arm (32-bit) arch if you modify or delete this patch.
|
|
|
|
--- a/src/netxs/desktopio/directvt.hpp
|
|
+++ b/src/netxs/desktopio/directvt.hpp
|
|
@@ -182,7 +182,9 @@ namespace netxs::directvt
|
|
log("dtvt: corrupted integer data");
|
|
return D{};
|
|
}
|
|
- auto crop = netxs::letoh(*reinterpret_cast<D const*>(data.data()));
|
|
+ auto data_aligned = D{};
|
|
+ ::memcpy(&data_aligned, data.data(), sizeof(D));
|
|
+ auto crop = netxs::letoh(data_aligned);
|
|
if constexpr (!PeekOnly)
|
|
{
|
|
data.remove_prefix(sizeof(D));
|