mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-09-21 20:06:40 +00:00
CStr: VC2005 fix - mustn't dereference end()
snd: Only open device once This was SVN commit r2452.
This commit is contained in:
@@ -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
|
||||
|
||||
+1
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user