Fix off-by-one error in max shader size check

This commit is contained in:
Tillmann Karras 2017-12-10 22:28:54 +00:00 committed by fincs
parent 11f2f1e521
commit 6dd682dbd5

View File

@ -2057,7 +2057,7 @@ int ProcessCommand(const char* cmd)
else
{
lastWasEnd = false;
if (!GetDvleData()->isGeoShader && g_outputBuf.size() >= MAX_VSH_SIZE)
if (!GetDvleData()->isGeoShader && g_outputBuf.size() > MAX_VSH_SIZE)
return throwError("instruction outside vertex shader code memory (max %d instructions, currently %d)\n", MAX_VSH_SIZE, g_outputBuf.size());
}