CStr: VC2005 fix - mustn't dereference end()
snd: Only open device once This was SVN commit r2452.
This commit is contained in:
parent
54bd7367e8
commit
f3b5e08030
@ -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
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user