AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Metamod:Source Questions (https://forums.alliedmods.net/forumdisplay.php?f=74)
-   -   A typo bug in sample_mm (https://forums.alliedmods.net/showthread.php?t=39452)

Elbandi 12-13-2005 05:40

A typo bug in sample_mm
 
i download the sourcemm from CVS.

the code:
Code:

#define  FIND_IFACE(func, assn_var, num_var, name, type) \
  do { \
      if ( (assn_var=(type)((ismm->func())(name, NULL))) != NULL ) { \
        num = 0; \
        break; \
      } \
      if (num >= 999) \
        break; \
  } while ( num_var=ismm->FormatIface(name, sizeof(name)-1) ); \
  if (!assn_var) { \
      if (error) \
        snprintf(error, maxlen, "Could not find interface %s", name); \
      return false; \
  }

i think, "num = 0;" and "num >= 999" sould be "num_var".

And in the load function, num sould have a default value.

Code:

int num=0;
Elbandi

BAILOPAN 12-13-2005 05:41

You are correct, I found this the other day when working on stripper. I've not commited the fix to CVS yet.


All times are GMT -4. The time now is 07:19.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.