Skip to content

Commit

Permalink
fix showing file open mode
Browse files Browse the repository at this point in the history
  • Loading branch information
davidly committed Mar 23, 2024
1 parent 038d286 commit 4ed4eb9
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions ntvdm.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -748,13 +748,13 @@ bool isFilenameChar( char c )
static const char * get_access_mode( uint8_t mode )
{
uint8_t m = mode & 3;
if ( 0 == mode )
return "read only";
if ( 1 == mode )
return "write only";
if ( 2 == mode )
return "read write";
return "invalid mode";
if ( 0 == m )
return "read-only";
if ( 1 == m )
return "write-only";
if ( 2 == m )
return "read/write";
return "invalid";
} //get_access_mode

static void trace_all_open_files()
Expand Down Expand Up @@ -1261,7 +1261,7 @@ bool FreeMemory( uint16_t segment )
{
// The Microsoft Basic compiler BC.EXE 7.10 attempts to free segment 0x80, which it doesn't own.
// Turbo Pascal v5.5 exits a process never created except via int21 0x55, which frees that PSP,
// which isn't allocated, and the environment blocked it contains (0).
// which isn't allocated, and the environment block it contains (0).

tracer.Trace( " ERROR: memory corruption possible; can't find freed segment %04x\n", segment );
return false;
Expand Down

0 comments on commit 4ed4eb9

Please sign in to comment.