# HG changeset patch # User Andre Heinecke # Date 1396609544 0 # Node ID 5e4ae994a32030438b7f93f31fdbacddaf2d48ce # Parent f17226aa2e091f476a350d0e23aa1d6dec70d90e Make buffer size for fakeHome environment variable dynamic. %TMP% can get ridicoulously long on windows. diff -r f17226aa2e09 -r 5e4ae994a320 ui/tests/cinstprocesstest.cpp --- a/ui/tests/cinstprocesstest.cpp Fri Apr 04 11:02:02 2014 +0000 +++ b/ui/tests/cinstprocesstest.cpp Fri Apr 04 11:05:44 2014 +0000 @@ -103,8 +103,9 @@ * see nsstest for the real test of that code */ #ifdef WIN32 { - char buf[255]; - snprintf(buf, 255, "APPDATA=%s",fakeHome.path().toLocal8Bit().constData()); + char buf[fakeHome.path().toLocal8Bit().size() + 9]; + snprintf(buf, fakeHome.path().toLocal8Bit().size() + 9, + "APPDATA=%s",fakeHome.path().toLocal8Bit().constData()); QVERIFY(_putenv (buf) != -1); } #else