Ignore:
Timestamp:
Mar 9, 2001, 11:48:48 PM (24 years ago)
Author:
mike
Message:

Updates/cleanup for Watcom (not complete)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/ddraw/OS2PALETTE.CPP

    r2174 r5291  
    1 /* $Id: OS2PALETTE.CPP,v 1.12 1999-12-21 01:28:16 hugh Exp $ */
     1/* $Id: OS2PALETTE.CPP,v 1.13 2001-03-09 22:48:46 mike Exp $ */
    22
    33/*
     
    9191HRESULT __stdcall PalQueryInterface(THIS This, REFIID riid, LPVOID FAR * ppvObj)
    9292{
    93   #ifdef DEBUG
    94     dprintf(("DDRAW: OS2IDirectDrawPalette::PalQueryInterface\n"));
    95   #endif
     93  dprintf(("DDRAW: OS2IDirectDrawPalette::PalQueryInterface\n"));
    9694
    9795  *ppvObj = NULL;
     
    112110  OS2IDirectDrawPalette *me = (OS2IDirectDrawPalette *)This;
    113111
    114   #ifdef DEBUG
    115     dprintf(("DDRAW: OS2IDirectDrawPalette::PalAddRef %d\n", me->Referenced+1));
    116   #endif
     112  dprintf(("DDRAW: OS2IDirectDrawPalette::PalAddRef %d\n", me->Referenced+1));
    117113
    118114  return (++me->Referenced);
     
    171167 OS2IDirectDrawPalette *me = (OS2IDirectDrawPalette *)This;
    172168
    173   #ifdef DEBUG
    174     dprintf(("DDRAW: OS2IDirectDrawPalette::PalGetEntries\n"));
    175   #endif
    176 
    177   if( (NULL== lpEntries) ||(0!=dwFlags) ||(dwBase<0) ||((dwBase + dwNumEntries)>me->dwSize) )
     169  dprintf(("DDRAW: OS2IDirectDrawPalette::PalGetEntries\n"));
     170
     171  if ((NULL == lpEntries) || (0 != dwFlags) || (dwBase > 65536)
     172      || ((dwBase + dwNumEntries) > me->dwSize))
    178173    return(DDERR_INVALIDPARAMS);
    179174
     
    188183HRESULT __stdcall PalInitialize(THIS, LPDIRECTDRAW, DWORD, LPPALETTEENTRY)
    189184{
    190   #ifdef DEBUG
    191     dprintf(("DDRAW: OS2IDirectDrawPalette::PalInitialize\n"));
    192   #endif
     185  dprintf(("DDRAW: OS2IDirectDrawPalette::PalInitialize\n"));
    193186  return(DDERR_ALREADYINITIALIZED);
    194187}
     
    202195 OS2IDirectDrawPalette *me = (OS2IDirectDrawPalette *)This;
    203196
    204   #ifdef DEBUG
    205     dprintf(("DDRAW: OS2IDirectDrawPalette::PalSetEntries\n"));
    206   #endif
    207   if( (NULL== lpNewEntries) ||(0!=dwFlags) ||(dwBase<0) ||((dwBase + dwNumEntries)>me->dwSize) )
     197  dprintf(("DDRAW: OS2IDirectDrawPalette::PalSetEntries\n"));
     198
     199  if ((NULL== lpNewEntries) || (0 != dwFlags) || (dwBase > 65536)
     200      || ((dwBase + dwNumEntries) > me->dwSize))
    208201    return(DDERR_INVALIDPARAMS);
    209202
Note: See TracChangeset for help on using the changeset viewer.