Found a problem with freepascal and lua when using the crt unit. Issue occurs when creating a pascal library called from lua, or when loading a lua script through a pascal program.

When the crt unit is loaded, the program stops responding when using io.read(), or io.input():read(...). Also when using the print function, the output is not lined up properly as expected. Issue only appears when I load the crt unit.

Anyone else having this problem, and is there a workaround that does not involve dropping the crt unit?