Hydrogenaudio Forums

Hosted Forums => foobar2000 => Development - (fb2k) => Topic started by: yme on 2018-03-08 10:03:42

Title: infinite recursion in pfc\string_base.h?
Post by: yme on 2018-03-08 10:03:42
Code: [Select]
	template<typename t_char> int strcmp_partial_ex_t(const t_char * p_string,t_size p_string_length,const t_char * p_substring,t_size p_substring_length) throw() {
p_string_length = strlen_max_t(p_string,p_string_length); p_substring_length = strlen_max_t(p_substring,p_substring_length);
return _strcmp_partial_ex(p_string,p_string_length,p_substring,p_substring_length);

template<typename t_char>
int strcmp_partial_t(const t_char * p_string,const t_char * p_substring) throw() {return strcmp_partial_ex_t(p_string,~0,p_substring,~0);}

inline int strcmp_partial_ex(const char * str, t_size strLen, const char * substr, t_size substrLen) throw() {return strcmp_partial_ex(str, strLen, substr, substrLen); }
inline int strcmp_partial(const char * str, const char * substr) throw() {return strcmp_partial_t(str, substr); }
This is near the very end of string_base.h.

strcmp_partial_ex just calls itself with the same parameters.  I'm guessing it should call strcmp_partial_ex_t instead.
Title: Re: infinite recursion in pfc\string_base.h?
Post by: Peter on 2018-03-08 17:04:34
Indeed it should, thanks for reporting.
SimplePortal 1.0.0 RC1 © 2008-2019