Skip to content

Conversation

@VictorMiasnikov
Copy link
Contributor

Fix runtime error inside m3quake QScanner

...


*** runtime error:
*** An enumeration or subrange value was out of range.
*** file "../src/QScanner.m3", line 49


*** execution of [<function _BuildGlobalFunction at 0x0000000002F2DD68>, <function _ShipFunction at 0x0000000002F2DDD8>] failed ***
...

...
t.buflen := M3File.Read (f, t.buffer^, size); (* VVM: it is line 49 *)
...

Fix runtime error inside m3quake QScanner

...
***
*** runtime error:
***    An enumeration or subrange value was out of range.
***    file "../src/QScanner.m3", line 49
***
 
 *** execution of [<function _BuildGlobalFunction at 0x0000000002F2DD68>, <function _ShipFunction at 0x0000000002F2DDD8>] failed ***
...
 
...
      t.buflen := M3File.Read (f, t.buffer^, size);    (* VVM: it is line 49  *)
...
@jaykrell
Copy link
Contributor

jaykrell commented Apr 19, 2022

Are you sure you have everything up to date?
It seems like you are hitting things I already fixed, like the slashes (long ago, not today).
In this case, the problem I hit months ago when first running DJGPP is that stat.size does not account for text conversion (\r\n to \n) and reading does, so the sizes would mismatch. Open should always be binary. I thought I made it so. Maybe I missed some.
I don't think this is the right fix.
The right fix is to always open binary.
I agree it is wonky, the entire text mode feature of stdio.

@VictorMiasnikov
Copy link
Contributor Author

VictorMiasnikov commented Apr 19, 2022 via email

@VictorMiasnikov
Copy link
Contributor Author

VictorMiasnikov commented Apr 19, 2022 via email

@jaykrell
Copy link
Contributor

@VictorMiasnikov this can be closed now right?

@VictorMiasnikov
Copy link
Contributor Author

VictorMiasnikov commented May 24, 2022

@VictorMiasnikov this can be closed now right?

This patch ( in any key) is part of:
https://github.com/VictorMiasnikov/cm3/releases/tag/d5.11.9-ZZYYXX-20220208_13-48

Nothing terrible happened with:
AMD64_LINUX
AMD64_MINGW
I386_DJGPP ( DOS)
AMD64_NT
I386_NT

But this patch is not be "a way to real solving of problem" ;-(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants