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

[Bug] rt_sscanf() 在处理 %[ ] 时,出错 #9853

Closed
dongly opened this issue Jan 1, 2025 · 4 comments
Closed

[Bug] rt_sscanf() 在处理 %[ ] 时,出错 #9853

dongly opened this issue Jan 1, 2025 · 4 comments

Comments

@dongly
Copy link
Contributor

dongly commented Jan 1, 2025

RT-Thread Version

8cf5389

Hardware Type/Architectures

STM32F407

Develop Toolchain

GCC

Describe the bug

    data = "+MIPURC: \"rtcp\",0,240,HTTP/1.1 200 OK"
    rt_sscanf(data, "+MIPURC:%*[^,],%d,%d", &device_socket, (int *)&bfsz);

以上语句, device_socket ,bfsz 不能正确获取到 0, 240

Other additional context

No response

@dongly
Copy link
Contributor Author

dongly commented Jan 1, 2025

@mysterywolf 🤝

@mysterywolf
Copy link
Member

我在看了 可以先把rt_vsscanf使用libc sscanf的Kconfig选项勾上,直接用libc的

@dongly
Copy link
Contributor Author

dongly commented Jan 4, 2025

现在就是这样用.

@mysterywolf
Copy link
Member

#9863

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