===Python API===

Bugfix: key curve names compared using strncmp instead of strcmp,
resulting in wrong comparisons.
This commit is contained in:
Ken Hughes
2006-07-02 21:37:06 +00:00
parent 9d4ae5ed19
commit f000ce6fba

View File

@@ -525,7 +525,7 @@ static short lookup_curve_name( char *str, int blocktype, int channel )
char *name = lookup_name ( *adrcodes );
/* if not a texture channel, just return the adrcode */
if( !strncmp( str, name, strlen( name ) ) ) {
if( !strcmp( str, name ) ) {
if( channel == -1 || *adrcodes < MA_MAP1 )
return (short)*adrcodes;
@@ -552,7 +552,7 @@ static short lookup_curve_key( char *str, Ipo *ipo )
/* look for a matching string, get the adrcode */
for( block = keyiter->block.first; block; block = block->next )
if( !strncmp( str, block->name, strlen( block->name) ) )
if( !strcmp( str, block->name ) )
return block->adrcode;
/* no match; no addr code */