Fix a bug in bufferSubData

I managed to miss that gl.getError() returns an integer, not a boolean.