My favorites | Sign in
Project Home Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 129: StringTools.fastCodeAt error
1 person starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  ----
Closed:  Jul 2011


 
Reported by ncanna...@gmail.com, Jul 16, 2011
The following should return "true" but instead show an error dialog :

StringTools.isEOF( StringTools.fastCodeAt("abc",3) );

Best,
Nicolas
Jul 16, 2011
#1 ncanna...@gmail.com
Proposed implementation for cca in hxString.h :

   inline int cca(int inPos) const
	{
		#ifdef HXCPP_DEBUG
      if (!__s) hx::CriticalError(HX_CSTRING("cca - Null String Reference"));
      #endif
		if ((unsigned)inPos >= length) return 0;
		return __s[inPos];
	}
Jul 19, 2011
Project Member #2 gameh...@gmail.com
What do you think if I just return 0 if __s==null ?  That would at least let "IsEOF" work.
Jul 20, 2011
Project Member #3 gameh...@gmail.com
Ok - just return 0 when out of bounds.  Seems the most useful thing.
Jul 20, 2011
Project Member #4 gameh...@gmail.com
(No comment was entered for this change.)
Status: Fixed

Powered by Google Project Hosting