8l, 6l: get .frame offset right undoing $-4 hack

This commit is contained in:
cinap_lenrek 2017-06-19 20:56:47 +02:00
parent eaffaab790
commit f109558b0c
2 changed files with 6 additions and 2 deletions

View file

@ -507,8 +507,10 @@ dostkoff(void)
if(p->as == ATEXT) {
curtext = p;
autoffset = p->to.offset;
if(autoffset < 0)
if(autoffset < 0) {
autoffset = 0;
p->to.offset = 0;
}
if(autoffset) {
p = appendp(p);
p->as = AADJSP;

View file

@ -492,8 +492,10 @@ dostkoff(void)
if(p->as == ATEXT) {
curtext = p;
autoffset = p->to.offset;
if(autoffset < 0)
if(autoffset < 0) {
autoffset = 0;
p->to.offset = 0;
}
if(autoffset) {
p = appendp(p);
p->as = AADJSP;