aboutsummaryrefslogtreecommitdiff
path: root/gdb/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/main.c')
-rw-r--r--gdb/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/main.c b/gdb/main.c
index df4b111..9813041 100644
--- a/gdb/main.c
+++ b/gdb/main.c
@@ -224,7 +224,7 @@ get_init_files (const char **system_gdbinit,
{
/* Append the part of SYSTEM_GDBINIT that follows GDB_DATADIR
to gdb_datadir. */
- char *tmp_sys_gdbinit = xstrdup (SYSTEM_GDBINIT + datadir_len);
+ char *tmp_sys_gdbinit = xstrdup (&SYSTEM_GDBINIT[datadir_len]);
char *p;
for (p = tmp_sys_gdbinit; IS_DIR_SEPARATOR (*p); ++p)