git://git.nikiroo.be
/
nsub.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4ba3962
)
utils: fix cstring_rfind
author
Niki Roo
<niki@nikiroo.be>
Thu, 3 Mar 2022 19:41:01 +0000
(20:41 +0100)
committer
Niki Roo
<niki@nikiroo.be>
Thu, 3 Mar 2022 19:41:01 +0000
(20:41 +0100)
src/utils/cstring.c
patch
|
blob
|
blame
|
history
diff --git
a/src/utils/cstring.c
b/src/utils/cstring.c
index 56a79fe9845303186337c5145ce46caab36930b1..d5015375d9ad2c2e71117d2bff53116aec0d1a2f 100644
(file)
--- a/
src/utils/cstring.c
+++ b/
src/utils/cstring.c
@@
-422,7
+422,7
@@
long cstring_rfind(char self[], const char find[], long rstart_index) {
size_t sz_needle = strlen(find);
if (rstart_index <= 0)
- rstart_index = (sz - 1);
+ rstart_index
+
= (sz - 1);
if (sz > rstart_index && sz_needle <= sz) {
for (size_t i = rstart_index;; i--) {