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) {
505
505
506
506
EXPECT_LT (ptr + size, memory->ByteSize ());
507
507
508
+ #if WABT_BIG_ENDIAN
509
+ std::copy (string_data.rbegin (), string_data.rbegin () + size,
510
+ memory->UnsafeData () + memory->ByteSize () - ptr - size);
511
+ #else
508
512
std::copy (string_data.begin (), string_data.begin () + size,
509
513
memory->UnsafeData () + ptr);
514
+ #endif
510
515
511
516
results[0 ].Set (size);
512
517
return Result::Ok;
@@ -527,8 +532,14 @@ TEST_F(InterpTest, Rot13) {
527
532
EXPECT_LT (ptr + size, memory->ByteSize ());
528
533
529
534
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
530
540
std::copy (memory->UnsafeData () + ptr, memory->UnsafeData () + ptr + size,
531
541
string_data.begin ());
542
+ #endif
532
543
533
544
return Result::Ok;
534
545
};
You can’t perform that action at this time.
0 commit comments