Skip to main content
Topic: infinite recursion in pfc\string_base.h? (Read 542 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

infinite recursion in pfc\string_base.h?

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.


Re: infinite recursion in pfc\string_base.h?

Reply #1
Indeed it should, thanks for reporting.

SimplePortal 1.0.0 RC1 © 2008-2019