File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -505,8 +505,13 @@ TEST_F(InterpTest, Rot13) {
505505
506506 EXPECT_LT (ptr + size, memory->ByteSize ());
507507
508+ #if WABT_BIG_ENDIAN
509+ std::copy (string_data.rbegin (), string_data.rbegin () + size,
510+ memory->UnsafeData () + memory->ByteSize () - ptr - size);
511+ #else
508512 std::copy (string_data.begin (), string_data.begin () + size,
509513 memory->UnsafeData () + ptr);
514+ #endif
510515
511516 results[0 ].Set (size);
512517 return Result::Ok;
@@ -527,8 +532,14 @@ TEST_F(InterpTest, Rot13) {
527532 EXPECT_LT (ptr + size, memory->ByteSize ());
528533
529534 string_data.resize (size);
535+ #if WABT_BIG_ENDIAN
536+ std::copy (memory->UnsafeData () + memory->ByteSize () - ptr - size,
537+ memory->UnsafeData () + memory->ByteSize () - ptr,
538+ string_data.rbegin ());
539+ #else
530540 std::copy (memory->UnsafeData () + ptr, memory->UnsafeData () + ptr + size,
531541 string_data.begin ());
542+ #endif
532543
533544 return Result::Ok;
534545 };
You can’t perform that action at this time.
0 commit comments