AtomCrafty / UniversalInjectorFramework

A framework to inject your own code into Windows applications.
46 stars 3 forks source link

Mismatched character alignment in text processor hook `GetTextExtentExPointA` #8

Open AtomCrafty opened 4 months ago

AtomCrafty commented 4 months ago

The current implementation of the GetTextExtentExPointA hook simply converts to utf16 and forwards it to GetTextExtentExPointW. This is incorrect if used with MBCSs since it assumes each character's index to equal its byte offset.