diff --git a/source/lib/res/snd.cpp b/source/lib/res/snd.cpp index 547b5dcaf3..a50e80a4b7 100755 --- a/source/lib/res/snd.cpp +++ b/source/lib/res/snd.cpp @@ -220,9 +220,10 @@ static int alc_init() { debug_assert(!"hit me"); } +#else + alc_dev = alcOpenDevice((ALubyte*)alc_dev_name); #endif - alc_dev = alcOpenDevice((ALubyte*)alc_dev_name); if(alc_dev) { alc_ctx = alcCreateContext(alc_dev, 0); // no attrlist needed diff --git a/source/ps/CStr.cpp b/source/ps/CStr.cpp index 2bea9163e9..9cce436e80 100755 --- a/source/ps/CStr.cpp +++ b/source/ps/CStr.cpp @@ -94,7 +94,7 @@ CStrW CStr8::FromUTF8() const CStrW result; const unsigned char* source = (const unsigned char*)&*begin(); - const unsigned char* sourceEnd = (const unsigned char*)&*end(); + const unsigned char* sourceEnd = source + length(); while (source < sourceEnd) { wchar_t ch = 0;