Ignore:
Timestamp:
Mar 5, 2003, 3:48:45 PM (22 years ago)
Author:
sandervl
Message:

better parameter checks in timeBegin/EndPeriod

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/winmm/time.cpp

    r8470 r9901  
    1 /* $Id: time.cpp,v 1.16 2002-05-22 15:50:26 sandervl Exp $ */
     1/* $Id: time.cpp,v 1.17 2003-03-05 14:48:45 sandervl Exp $ */
    22
    33/*
     
    8787MMRESULT WINAPI timeBeginPeriod(UINT cMilliseconds)
    8888{
     89  if (cMilliseconds < OS2TIMER_RESOLUTION_MINIMUM || cMilliseconds > OS2TIMER_RESOLUTION_MAXIMUM)
     90      return TIMERR_NOCANDO;
     91
    8992  if (TRUE == OS2TimerResolution::enterResolutionScope(cMilliseconds))
    9093    return TIMERR_NOERROR;
     
    108111MMRESULT WINAPI timeEndPeriod(UINT cMilliseconds)
    109112{
     113  if (cMilliseconds < OS2TIMER_RESOLUTION_MINIMUM || cMilliseconds > OS2TIMER_RESOLUTION_MAXIMUM)
     114      return TIMERR_NOCANDO;
     115
    110116  if (TRUE == OS2TimerResolution::leaveResolutionScope(cMilliseconds))
    111117    return TIMERR_NOERROR;
Note: See TracChangeset for help on using the changeset viewer.