format.h doesn't handle `char*` correctly
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
Research direction
Start by locating the implementation and tests for the format function, then reproduce the reported char* example. Done means the example produces "dolor sit lorem ipsum amet" correctly, or the source documents the required conversion if the behavior is intentionally unsupported.
Written by the indexing model from the issue text.
Description
char *foobar = "lorem ipsum";
format("dolor sit {1} amet", foobar);
Expected result:
"dolor sit lorem ipsum amet"
Actual result:
"dolor sit dolor sit amet amet"
When passing in a char*-type variable to format's varargs list, need to cast the variable to std::string or convert it to a std::string. Not doing so results in fmt variable (first arg) being read a second time as one of the vararg variables.
Not a major issue but this small wart can take people by surprise - if this is wontfix, may I recommend adding a comment in the source?
- Dominant language
- C++
- Stars
- 7
- Forks
- 30
- PR merge metrics
- No merged PRs in 30d
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from GothenburgBitFactory/libshared
-
Unnecessary files from libshared are installed when used as submodulePossibly taken @lauft claimed this 11 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 4/5 3-5 days Newbie friendliness 30/100
GothenburgBitFactory/libshared#112 · 2 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
GothenburgBitFactory/libshared#77 · 1 comment ·
-
work-week ends do not seem to be calculated correctlyPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 3/5 1-2 days Newbie friendliness 45/100
GothenburgBitFactory/libshared#49 · 2 comments ·
All issues in GothenburgBitFactory/libshared
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Icinga/icinga2#11077 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
-
agent:WSL bug linux LOW ui
Difficulty 1/5 Under an hour Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Copter: PosHold brake-entry threshold became 16 deg instead of 0.16 deg after the radians conversionOpen
Difficulty 1/5 Under an hour Newbie friendliness 78/100
ArduPilot/ardupilot#34617 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
tesseract-robotics/tesseract_nanobind#168 ·
Maintainers usually reply within 1 day