about summary refs log tree commit diff stats
path: root/src/libtools
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2021-03-11 19:03:28 +0100
committerptitSeb <sebastien.chev@gmail.com>2021-03-11 19:03:28 +0100
commit4827427ac026eb4a47e25f868728d4455e968e91 (patch)
treea9f3fbfcf49d52e8f61fb7141e0cff4c1949e9d5 /src/libtools
parent8e732046ba4ea85f964691ac82421fdc7d1a1084 (diff)
downloadbox64-4827427ac026eb4a47e25f868728d4455e968e91.tar.gz
box64-4827427ac026eb4a47e25f868728d4455e968e91.zip
Added alignment for 'long double' handling in '...'
Diffstat (limited to 'src/libtools')
-rwxr-xr-xsrc/libtools/myalign.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libtools/myalign.c b/src/libtools/myalign.c
index 650d6040..662dd120 100755
--- a/src/libtools/myalign.c
+++ b/src/libtools/myalign.c
@@ -100,7 +100,11 @@ void myStackAlign(x64emu_t* emu, const char* fmt, uint64_t* st, uint64_t* mystac
                 ++p;
                 break;
             case 14:    //%LG long double
+                if((((uintptr_t)(st+1))&0xf)!=0)
+                    st++;
                 #ifdef HAVE_LD80BITS
+                if((((uintptr_t)mystack)&0xf)!=0)
+                    mystack++;
                 memcpy(mystack, st, 16);
                 st+=2; mystack+=2;
                 #else