Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xml test fail:Uncaught (in promise) RuntimeError: memory access out of bounds #192

Open
sonygod opened this issue Jul 12, 2023 · 3 comments

Comments

@sonygod
Copy link

sonygod commented Jul 12, 2023

platform: emscripten wasm

void test_xml()
{
    person p = {"admin", 20};
    iguana::string_stream ss;
    iguana::to_xml(ss, p);
    std::cout << ss << std::endl;

   
    ss.clear();
    two t = {"test", {2}, 4};
    iguana::to_xml(ss, t);

    

    std::cout << ss << std::endl;

    two t1;
    iguana::from_xml(t1, ss.data());//
    std::cout << t1.age << "\n";
    
}

iguana::from_xml(t1, ss.data());//will throw Uncaught (in promise) RuntimeError: memory access out of bounds

@bbbgan
Copy link
Collaborator

bbbgan commented Jul 12, 2023

Is this the old version? iguana::xml has been refactored recently. Can you give it a try?
However, it is based on C++20, The support for C++17 is In the plan

@bbbgan
Copy link
Collaborator

bbbgan commented Jul 12, 2023 via email

@bbbgan
Copy link
Collaborator

bbbgan commented Jul 12, 2023

I am planing to resolve these conflicts while supporting 17, and if necessary, you can also resolve these conflicts yourself. If you want me to solve it, it's also my pleasure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants