WinRT compatibility functions: properly return ERANGE from getenv

...when the buffer's size is smaller than the value size.

Change-Id: Id345982c9fc4ceed6505d0c192680c47c554fcb4
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
bb10
Andrew Knight 2013-11-04 12:59:40 +02:00 committed by The Qt Project
parent fac56f3866
commit af0409d336
1 changed files with 1 additions and 1 deletions

View File

@ -71,7 +71,7 @@ errno_t qt_winrt_getenv_s(size_t* sizeNeeded, char* buffer, size_t bufferSize, c
if (bufferSize < (size_t)value.size()) {
*sizeNeeded = value.size();
return 0;
return ERANGE;
}
strcpy(buffer, value.constData());