Small string length member on TCompilerStatus

Summary

TCompilerStatus in comphook.pas, currentmodulestate member is string[20],

  TCompilerStatus = record
  { Current status }
    currentmodule,
    currentsourceppufilename, { the name of the ppu where the source file
                                comes from where the error location is given }
    currentsourcepath,
    currentsource : string;   { filename }
    currentline,
    currentcolumn : longint;  { current line and column }
    currentmodulestate : string[20];
  { Total Status }
    compiledlines : longint;  { the number of lines which are compiled }
    errorcount,               { this field should never be increased directly,

But ModuleStateStr in finput.pas is string[32],

        ModuleStateStr : array[TModuleState] of string[32] = (
          'Unknown',
          'Registered',
          'Load',
          'Compile',
          'Compiling_Waiting',
          'Compiling_Waiting_interface',
          'Compiling_Waiting_implementation',
          'Compiling_Waiting_finish',
          'Compiled_Waiting_crc',
          'Compiled',
          'Processed',
          'Error'
        );

And UpdateStatus in verbose.pas, assign string[32] to string[20]

              { update status record }
              status.currentmodule:=module.modulename^;
              status.currentsourceppufilename:=module.ppufilename;
              status.currentmodulestate:=ModuleStateStr[module.state];

System Information

  • Operating system: Win32/Win64
  • Processor architecture: x86, x86_64
  • Compiler version: trunk
  • Device:

Steps to reproduce

Example Project

What is the current bug behavior?

There is no error, but it seems like it could be a problem.

What is the expected (correct) behavior?

Relevant logs and/or screenshots

Possible fixes

comphook.diff