fix xbox::RtlInitAnsiString when used inside cxbxr

This commit is contained in:
RadWolfie 2021-04-02 09:58:18 -05:00
parent 45e4e18415
commit db6dd7110e
2 changed files with 3 additions and 3 deletions

View File

@ -85,7 +85,7 @@ namespace xbox
// ******************************************************************
typedef char_xt *PCHAR;
typedef char_xt *PSZ;
typedef char_xt *PCSZ;
typedef const char_xt *PCSZ;
typedef byte_xt *PBYTE;
typedef boolean_xt *PBOOLEAN;
typedef uchar_xt *PUCHAR;

View File

@ -1072,10 +1072,10 @@ XBSYSAPI EXPORTNUM(289) xbox::void_xt NTAPI xbox::RtlInitAnsiString
LOG_FUNC_ARG(SourceString)
LOG_FUNC_END;
DestinationString->Buffer = SourceString;
DestinationString->Buffer = const_cast<PCHAR>(SourceString);
if (SourceString != NULL) {
CCHAR *pSourceString = (CCHAR*)(SourceString);
DestinationString->Buffer = SourceString;
DestinationString->Buffer = const_cast<PCHAR>(SourceString);
DestinationString->Length = (USHORT)strlen(pSourceString);
DestinationString->MaximumLength = DestinationString->Length + 1;
}