Problem with strings in firetongue on iOS

I’m trying to compile a game on iOS with older versions of haxelibs in order to avoid the double sound issue. They are:

  • openfl 8.4.1
  • lime 7.0.0
  • hxcpp 4.0.52
  • firetongue 2.0.0
  • using Haxe 3.4.7

I’m getting an EXC_BAD_ACCESS (code =1, address=0x6) error when comparing strings. This comes from firetongue, but it seems an issue related to special characters (which is strange since I thought that was a Haxe 4 issue). It happens when loading a tsv localization file in a language other than English.

The error usually happens when a line in the localization file ends with a special/accented character (such as í). It seems to happen at the charAt() call in the following function of TSV.hx:

private override function processRows(rows:Array<String>):Void
{
	for (i in 0...rows.length)
	{
		var row:String = rows[i];
		while (row.charAt(row.length - 1) == "\t")		//trim trailing tabs
		{
			row = row.substr(0, row.length - 1);
		}
		processCells(getCells(row), i);
	}
}

But even if I comment out the while, the error still occurs later, when I try to access the text.

The exact location of the error is in a file called hxString.h, in compare():

#ifdef HX_SMART_STRINGS
int compare(const ::String &inRHS) const;
#else
inline int compare(const ::String &inRHS) const
{
   const char *r = inRHS.__s;
   if (__s == r) return inRHS.length-length;
   if (__s==0) return -1;
   if (r==0) return 1;

   return strcmp(__s,r);  // EXC_BAD_ACCESS error here
   //return memcmp(__s,r,length);
}
#endif

Any idea on what could be causing this? Thanks.