Changelog
Follow on from last patch, ensure if we have 3 lights for example then
only allow 0,1 and 2!
Jason
--- dlls/d3d8/device.dx31 2003-05-15 19:29:54.000000000 +0100
+++ dlls/d3d8/device.c 2003-05-15 19:30:36.000000000 +0100
@@ -2554,7 +2554,7 @@
ICOM_THIS(IDirect3DDevice8Impl,iface);
TRACE("(%p) : Idx(%ld), pLight(%p)\n", This, Index, pLight);
- if (Index > This->maxLights) {
+ if (Index >= This->maxLights) {
TRACE("Cannot handle more lights than device supports\n");
return D3DERR_INVALIDCALL;
}
@@ -2695,7 +2695,7 @@
ICOM_THIS(IDirect3DDevice8Impl,iface);
TRACE("(%p) : Idx(%ld), pLight(%p)\n", This, Index, pLight);
- if (Index > This->maxLights) {
+ if (Index >= This->maxLights) {
TRACE("Cannot handle more lights than device supports\n");
return D3DERR_INVALIDCALL;
}
@@ -2707,7 +2707,7 @@
ICOM_THIS(IDirect3DDevice8Impl,iface);
TRACE("(%p) : Idx(%ld), enable? %d\n", This, Index, Enable);
- if (Index > This->maxLights) {
+ if (Index >= This->maxLights) {
TRACE("Cannot handle more lights than device supports\n");
return D3DERR_INVALIDCALL;
}
@@ -2735,7 +2735,7 @@
ICOM_THIS(IDirect3DDevice8Impl,iface);
TRACE("(%p) : for idx(%ld)\n", This, Index);
- if (Index > This->maxLights) {
+ if (Index >= This->maxLights) {
TRACE("Cannot handle more lights than device supports\n");
return D3DERR_INVALIDCALL;
}