Module: wine Branch: refs/heads/master Commit: 345dd49eda7f53977c829d9ce1c4b460a37d191b URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=345dd49eda7f53977c829d9c...
Author: Ivan Gyurdiev ivg231@gmail.com Date: Sun Jul 9 22:52:23 2006 -0600
wined3d: Fix off-by-one constants bug.
---
dlls/wined3d/device.c | 24 ++++++++++++------------ 1 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 7176954..45dd144 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -4654,7 +4654,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl UINT count) {
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - int i, cnt = min(count, MAX_VSHADER_CONSTANTS - (start + 1)); + int i, cnt = min(count, MAX_VSHADER_CONSTANTS - start);
TRACE("(iface %p, srcData %p, start %d, count %d)\n", iface, srcData, start, count); @@ -4681,7 +4681,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl UINT count) {
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - int cnt = min(count, MAX_VSHADER_CONSTANTS - (start + 1)); + int cnt = min(count, MAX_VSHADER_CONSTANTS - start);
TRACE("(iface %p, dstData %p, start %d, count %d)\n", iface, dstData, start, count); @@ -4700,7 +4700,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl UINT count) {
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - int i, cnt = min(count, MAX_VSHADER_CONSTANTS - (start + 1)); + int i, cnt = min(count, MAX_VSHADER_CONSTANTS - start);
TRACE("(iface %p, srcData %p, start %d, count %d)\n", iface, srcData, start, count); @@ -4728,7 +4728,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl UINT count) {
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - int cnt = min(count, MAX_VSHADER_CONSTANTS - (start + 1)); + int cnt = min(count, MAX_VSHADER_CONSTANTS - start);
TRACE("(iface %p, dstData %p, start %d, count %d)\n", iface, dstData, start, count); @@ -4747,7 +4747,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl UINT count) {
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - int i, cnt = min(count, MAX_VSHADER_CONSTANTS - (start + 1)); + int i, cnt = min(count, MAX_VSHADER_CONSTANTS - start);
TRACE("(iface %p, srcData %p, start %d, count %d)\n", iface, srcData, start, count); @@ -4775,7 +4775,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl UINT count) {
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - int cnt = min(count, MAX_VSHADER_CONSTANTS - (start + 1)); + int cnt = min(count, MAX_VSHADER_CONSTANTS - start);
TRACE("(iface %p, dstData %p, start %d, count %d)\n", iface, dstData, start, count); @@ -4836,7 +4836,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl UINT count) {
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - int i, cnt = min(count, MAX_PSHADER_CONSTANTS - (start + 1)); + int i, cnt = min(count, MAX_PSHADER_CONSTANTS - start);
TRACE("(iface %p, srcData %p, start %d, count %d)\n", iface, srcData, start, count); @@ -4863,7 +4863,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl UINT count) {
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - int cnt = min(count, MAX_PSHADER_CONSTANTS - (start + 1)); + int cnt = min(count, MAX_PSHADER_CONSTANTS - start);
TRACE("(iface %p, dstData %p, start %d, count %d)\n", iface, dstData, start, count); @@ -4882,7 +4882,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl UINT count) {
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - int i, cnt = min(count, MAX_PSHADER_CONSTANTS - (start + 1)); + int i, cnt = min(count, MAX_PSHADER_CONSTANTS - start);
TRACE("(iface %p, srcData %p, start %d, count %d)\n", iface, srcData, start, count); @@ -4910,7 +4910,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl UINT count) {
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - int cnt = min(count, MAX_PSHADER_CONSTANTS - (start + 1)); + int cnt = min(count, MAX_PSHADER_CONSTANTS - start);
TRACE("(iface %p, dstData %p, start %d, count %d)\n", iface, dstData, start, count); @@ -4929,7 +4929,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl UINT count) {
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - int i, cnt = min(count, MAX_PSHADER_CONSTANTS - (start + 1)); + int i, cnt = min(count, MAX_PSHADER_CONSTANTS - start);
TRACE("(iface %p, srcData %p, start %d, count %d)\n", iface, srcData, start, count); @@ -4957,7 +4957,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl UINT count) {
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - int cnt = min(count, MAX_PSHADER_CONSTANTS - (start + 1)); + int cnt = min(count, MAX_PSHADER_CONSTANTS - start);
TRACE("(iface %p, dstData %p, start %d, count %d)\n", iface, dstData, start, count);