Skip to content

Commit

Permalink
:Merge branch 'master' of github.com:objeck/objeck-lang
Browse files Browse the repository at this point in the history
  • Loading branch information
objeck committed Feb 26, 2024
2 parents 9a92aaf + 6a6ed8d commit ca553c9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 16 deletions.
4 changes: 2 additions & 2 deletions core/vm/arch/jit/jit_common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,9 @@ void JitCompiler::JitStackCallback(const long instr_id, StackInstr* instr, const
conv = formatter.str();
}

const size_t max = conv.size() < 32 ? conv.size() : 32;
const size_t max = str_ptr[0];
#ifdef _WIN32
wcsncpy_s(str, str_ptr[0], conv.c_str(), max);
wcsncpy_s(str, str_ptr[0] + 1, conv.c_str(), max);
#else
wcsncpy(str, conv.c_str(), max);
#endif
Expand Down
15 changes: 1 addition & 14 deletions programs/tests/prgm287.obs
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
class Test {
function : Main(args : String[]) ~ Nil {
str := "𤭢";
System.IO.Standard->SetIntFormat(System.Number->Format->HEX);
u8str := str->ToByteArray();
each(b in u8str) {
b->ToHexString()->Print();
" "->Print();
}
""->PrintLine();
u16str := str->ToCharArray();
each(i in u16str) {
c : Int := i;
c->Print();
" "->Print();
}
-1->ToHexString()->Print();
}
}

0 comments on commit ca553c9

Please sign in to comment.