microsoft / terminal

The new Windows Terminal and the original Windows console host, all in the same place!
MIT License
95.01k stars 8.22k forks source link

ReadPendingInput plays unsafe byte/char games with pending data #807

Open miniksa opened 5 years ago

miniksa commented 5 years ago

Ported from MSFT: 18047766.

I fixed an immediate crash bug in MSFT: 17987369 that affected this area, but realized at the time that it's really bad that the ReadPendingInput function in the console host is playing games with a void pointer and mix-and-match of byte versus character counting.

This represents investigating what we can do to stop mix/matching the char and byte counts in ReadPendingInput.

@adiviness might be working on something like this with his changes to input to support emoji...

adiviness commented 5 years ago

Yup, I'm going to have to fix this up as well.