mirror of
https://github.com/darlinghq/darling-gdb.git
synced 2024-11-25 21:19:54 +00:00
* interp.c (strswaplen): Add one for '\0' delimiter.
This commit is contained in:
parent
f1ea48cbd9
commit
63bee80353
@ -1,3 +1,7 @@
|
||||
2005-08-02 J"orn Rennecke <joern.rennecke@st.com>
|
||||
|
||||
* interp.c (strswaplen): Add one for '\0' delimiter.
|
||||
|
||||
2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
|
||||
|
||||
* gencode.c (tab): Avoid lvalue casts. Suggested by
|
||||
|
@ -959,6 +959,10 @@ ptr (x)
|
||||
return (char *) (x + saved_state.asregs.memory);
|
||||
}
|
||||
|
||||
/* STR points to a zero-terminated string in target byte order. Return
|
||||
the number of bytes that need to be converted to host byte order in order
|
||||
to use this string as a zero-terminated string on the host.
|
||||
(Not counting the rounding up needed to operate on entire words.) */
|
||||
static int
|
||||
strswaplen (str)
|
||||
int str;
|
||||
@ -971,7 +975,7 @@ strswaplen (str)
|
||||
return 0;
|
||||
end = str;
|
||||
for (end = str; memory[end ^ endian]; end++) ;
|
||||
return end - str;
|
||||
return end - str + 1;
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user