mirror of
https://github.com/radareorg/radare2.git
synced 2024-11-28 23:50:40 +00:00
Fix build
This commit is contained in:
parent
446d4b27db
commit
dc203aeb27
@ -2944,7 +2944,7 @@ static void delete_last_comment(RDisasmState *ds) {
|
||||
int len = 0;
|
||||
char *ll = r_cons_lastline (&len);
|
||||
if (ll) {
|
||||
char *begin = strnstr (ll, "; ", len);
|
||||
const char *begin = r_str_nstr (ll, "; ", len);
|
||||
if (begin) {
|
||||
const int cstrlen = strlen (ll);
|
||||
r_cons_drop (cstrlen - (int)(begin - ll));
|
||||
|
@ -75,7 +75,7 @@ R_API char *r_str_trim_head_tail(char *str);
|
||||
R_API ut32 r_str_hash(const char *str);
|
||||
R_API ut64 r_str_hash64(const char *str);
|
||||
R_API char *r_str_clean(char *str);
|
||||
R_API int r_str_nstr(char *from, char *to, int size);
|
||||
R_API const char *r_str_nstr(const char *from, const char *to, int size);
|
||||
R_API const char *r_str_lchr(const char *str, char chr);
|
||||
R_API const char *r_sub_str_lchr(const char *str, int start, int end, char chr);
|
||||
R_API const char *r_sub_str_rchr(const char *str, int start, int end, char chr);
|
||||
|
@ -622,14 +622,14 @@ R_API const char *r_str_rchr(const char *base, const char *p, int ch) {
|
||||
return (p < base) ? NULL : p;
|
||||
}
|
||||
|
||||
R_API int r_str_nstr(char *from, char *to, int size) {
|
||||
R_API const char *r_str_nstr(const char *from, const char *to, int size) {
|
||||
int i;
|
||||
for (i = 0; i < size; i++) {
|
||||
if (!from || !to || from[i] != to[i]) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
return (size!=i);
|
||||
return from + i;
|
||||
}
|
||||
|
||||
// TODO: rewrite in macro?
|
||||
|
Loading…
Reference in New Issue
Block a user