]> git.sur5r.net Git - cc65/commitdiff
Translate chars returned by .strat into the target charset
authorcuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Fri, 1 Dec 2000 10:37:41 +0000 (10:37 +0000)
committercuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Fri, 1 Dec 2000 10:37:41 +0000 (10:37 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@509 b7a2c559-68d2-44c3-8de9-860c34a00d81

src/ca65/expr.c

index 7d20da271035bd76cc476c163a9997f5a17278fb..f6b4125477107df62223b3e8ddce84bcf1aa6e58 100644 (file)
@@ -364,8 +364,10 @@ static int FuncStrAt (void)
        return 0;
     }
 
-    /* Return the char, handle as unsigned */
-    return (unsigned char) Str[(size_t)Index];
+    /* Return the char, handle as unsigned. Be sure to translate it into
+     * the target character set.
+     */
+    return (unsigned char) TgtTranslateChar (Str [(size_t)Index]);
 }