mirror of
https://github.com/Alcaro/Flips.git
synced 2026-09-12 04:25:17 -05:00
Update Arlib
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
|
||||
//The above license applies only to this file, not the entire Arlib.
|
||||
//The above license applies only to the WuTF directory, not the entire Arlib.
|
||||
|
||||
//See wutf.h for documentation.
|
||||
|
||||
@@ -159,6 +159,7 @@ void WuTF_redirect_function(WuTF_funcptr victim, WuTF_funcptr replacement)
|
||||
DWORD prot;
|
||||
//it's usually considered bad to have W+X on the same page, but the alternative is risking
|
||||
// removing X from VirtualProtect or NtProtectVirtualMemory, and then I can't fix it.
|
||||
//alternatively, it could make C do W; e.
|
||||
//it doesn't matter, anyways; we (should be) called so early no hostile input has been processed
|
||||
// yet, and even if hostile code is running, it can just wait until I put back X.
|
||||
VirtualProtect((void*)victim, 64, PAGE_EXECUTE_READWRITE, &prot);
|
||||
@@ -235,9 +236,9 @@ void WuTF_args(int* argc_p, char** * argv_p)
|
||||
|
||||
for (i=0;i<argc;i++)
|
||||
{
|
||||
int cb = WuTF_utf16_to_utf8(0, (uint16_t*)wargv[i], -1, NULL, 0);
|
||||
int cb = WideCharToMultiByte(CP_UTF8, 0, wargv[i], -1, NULL, 0, NULL, NULL);
|
||||
argv[i] = (char*)HeapAlloc(GetProcessHeap(), 0, cb);
|
||||
WuTF_utf16_to_utf8(0, (uint16_t*)wargv[i], -1, argv[i], cb);
|
||||
WideCharToMultiByte(CP_UTF8, 0, wargv[i], -1, argv[i], cb, NULL, NULL);
|
||||
}
|
||||
argv[argc]=0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user