summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Michel Pedrono2013-03-19 12:40:33 (EDT)
committer Eugene Tarassov2013-03-19 15:07:58 (EDT)
commit77c0e991c68ec73e77413c08b8a6e4a9a8e7254b (patch)
tree2ff1b3807b17741e69083315f5299a9c56aa8af1
parent389f2836fb978c5e524cbc8e8d9552293d5750a9 (diff)
downloadorg.eclipse.tcf.agent-77c0e991c68ec73e77413c08b8a6e4a9a8e7254b.zip
org.eclipse.tcf.agent-77c0e991c68ec73e77413c08b8a6e4a9a8e7254b.tar.gz
org.eclipse.tcf.agent-77c0e991c68ec73e77413c08b8a6e4a9a8e7254b.tar.bz2
Bug 403820 - Fixed set_string_text_val() for big endian architectures
-rw-r--r--agent/tcf/services/expressions.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/agent/tcf/services/expressions.c b/agent/tcf/services/expressions.c
index 81016ed..35cf28a 100644
--- a/agent/tcf/services/expressions.c
+++ b/agent/tcf/services/expressions.c
@@ -318,12 +318,14 @@ static void set_string_text_val(int pos, int len, int in_quotes, size_t char_siz
if (in_quotes) {
while (cnt < len) {
int ch = next_char_val();
+ if (big_endian) swap_bytes(&ch, sizeof (ch));
memcpy((uint8_t *)text_val.value + char_size * cnt++, &ch, char_size);
}
}
else {
while (cnt < len) {
int ch = text_ch;
+ if (big_endian) swap_bytes(&ch, sizeof (ch));
memcpy((uint8_t *)text_val.value + char_size * cnt++, &ch, char_size);
next_ch_fast();
}