Improve Shader error messages;
@@ -319,8 +319,9 @@ static void lovrShaderSetUniform(Shader* shader, const char* name, UniformType t
return;
}
+ const char* plural = (uniform->size / size) > 1 ? "s" : "";
lovrAssert(uniform->type == type, "Unable to send %ss to uniform %s", debug, uniform->name);
- lovrAssert(count * size == uniform->size, "Expected %d %ss for uniform %s, got %d", uniform->count, debug, uniform->name, count);
+ lovrAssert(count * size == uniform->size, "Expected %d %s%s for uniform %s, got %d", uniform->size / size, debug, plural, uniform->name, count);
if (!uniform->dirty && !memcmp(uniform->value.data, data, count * size)) {
return;
