We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hello,
If the replacement string size (y) is not equal to the needle size (x) zrepstr(...) function overwrites other characters.
y
x
zrepstr(...)
For example,
#include <stdio.h> #include <string.h> #include "zrepstr.h" int main() { char str[50] = {0}; snprintf(str, sizeof(str), "My simple text message"); zrepstr(str, "text", "more than text"); fprintf(stdout, "%s\n", str); }
Where "more than text" overwrite the "message" string and it becomes something like this, "My simple more than te".
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hello,
If the replacement string size (
y
) is not equal to the needle size (x
)zrepstr(...)
function overwrites other characters.For example,
Where "more than text" overwrite the "message" string and it becomes something like this, "My simple more than te".
The text was updated successfully, but these errors were encountered: