aboutsummaryrefslogtreecommitdiff
path: root/unprotbas.c
diff options
context:
space:
mode:
Diffstat (limited to 'unprotbas.c')
-rw-r--r--unprotbas.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/unprotbas.c b/unprotbas.c
index 242ea82..c59a33c 100644
--- a/unprotbas.c
+++ b/unprotbas.c
@@ -166,21 +166,10 @@ void set_header_vars(void) {
*/
int fixline(int linepos) {
/* +3 here to skip the line number + line length */
- int token, done = 0, offset = data[linepos + 3];
+ int offset = data[linepos + 3];
- /* this works for lines with multiple statements (colons): */
- while(!done) {
+ while(data[linepos + offset - 1] == 0x14)
offset = data[linepos + offset];
- token = data[linepos + offset - 1];
- if(token != 0x14)
- done++;
- }
-
- /* otherwise, the first statement being the only statement, use its
- next-statement offset. */
- if(!offset) {
- offset = data[linepos + 3];
- }
data[linepos + 2] = offset;
return offset;