Commits

jas43  committed de4e6a3

Clear ErrString before setting it to contain the error string from lua.

If ErrString is longer than the actual message from Lua, then the additional
characters are not set and either contain garbage or that part of its previous
value. This is not useful information and prevents (e.g.) trim from working
correctly. A safe default is hence just to completely clear ErrString before
setting it.

  • Participants
  • Parent commits 6d2b686

Comments (0)

Files changed (1)

File source/aot_err_module.f90

 
       string => flu_tolstring(L, -1, str_len)
       if (present(ErrString)) then
+        ErrString = ''
         do i=1,min(str_len, len(ErrString))
           ErrString(i:i) = string(i)
         end do