diff options
author | Gürkan Sengün <gurkan@phys.ethz.ch> | 2012-06-22 14:52:55 +0200 |
---|---|---|
committer | Jonathan McCrohan <jmccrohan@gmail.com> | 2012-10-30 21:29:31 +0000 |
commit | 4247b0208aea6c1251eca8bf138a3986671da2bb (patch) | |
tree | d0c14ee43c6ccc8e7890cfba8fdb741510108b9a /markers.c | |
parent | fe6079449518e3acce8074d4a04f2b85708e19c4 (diff) | |
parent | b870e05547bc189f29569a5d21db0c875c8f9983 (diff) | |
download | dhex-4247b0208aea6c1251eca8bf138a3986671da2bb.tar.gz |
Imported Debian patch 0.67-1debian/0.67-1
Diffstat (limited to 'markers.c')
-rw-r--r-- | markers.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -95,10 +95,10 @@ int writemarkerfile(tMarkers* markers,char* filename) fclose(f); return RETOK; } -tInt8 gotomask(tOutput* output,tMarkers* markers,tUInt64* cursorpos) +tInt8 gotomask(tOutput* output,tMarkers* markers,tUInt64* cursorpos,tInt64 baseaddr) { - tUInt64 actcursorpos=*cursorpos; - tUInt64 newcursorpos=*cursorpos; + tUInt64 actcursorpos=*cursorpos+baseaddr; + tUInt64 newcursorpos=*cursorpos+baseaddr; tInt8 itemnums[25]; tInt8 selected; tMenu Menu1; @@ -177,7 +177,7 @@ tInt8 gotomask(tOutput* output,tMarkers* markers,tUInt64* cursorpos) newcursorpos=actcursorpos; hexinput(output,offsy+3,offsx+8,&newcursorpos,NULL,17); } - if (selected==itemnums[1]) {*cursorpos=newcursorpos;return RETOK;} + if (selected==itemnums[1]) {*cursorpos=newcursorpos-baseaddr;return RETOK;} //FIXME if (selected==itemnums[2]) return RETNOK; for (i=0;i<NUMMARKERS;i++) @@ -189,7 +189,7 @@ tInt8 gotomask(tOutput* output,tMarkers* markers,tUInt64* cursorpos) } if (selected==itemnums[13+i]) { - if (markers->relative[i]=='=') newcursorpos =markers->cursorpos[i]; + if (markers->relative[i]=='=') newcursorpos =markers->cursorpos[i]-baseaddr; // FIXME if (markers->relative[i]=='-') newcursorpos=actcursorpos-markers->cursorpos[i]; if (markers->relative[i]=='+') newcursorpos=actcursorpos+markers->cursorpos[i]; } |