While filling the arr/dep card; a random guy came to ask if I slept one night in Malaysia...
Then no issue until stamping back in Thailand. They took my passport to the office of the boss there I guess; a short interview then I was allowed to come back the same day.
If I didn't have already a visa; they would have sent me back to Malaysia, I guess...