* addr2line.c (get_nth_dirname): decrement the directory index

because the index specifies the index of given included_directories
  which is separated by NUL and its index is begun from 1.
  Note that 0 specifies the current directory of the compilation.
  see also http://www.dwarfstd.org/doc/dwarf-2.0.0.pdf

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2011-01-12 15:35:07 +00:00
parent b1f8bbf4f7
commit e57215bf51
2 changed files with 9 additions and 1 deletions

View File

@ -1,3 +1,11 @@
Thu Jan 13 00:32:54 2011 NARUSE, Yui <naruse@ruby-lang.org>
* addr2line.c (get_nth_dirname): decrement the directory index
because the index specifies the index of given included_directories
which is separated by NUL and its index is begun from 1.
Note that 0 specifies the current directory of the compilation.
see also http://www.dwarfstd.org/doc/dwarf-2.0.0.pdf
Thu Jan 13 00:06:38 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
* io.c (rb_f_syscall): Add warning messages. [ruby-core:34062]

View File

@ -121,7 +121,7 @@ get_nth_dirname(int dir, char *p)
if (!dir--) {
return "";
}
while (dir) {
while (dir--) {
while (*p) p++;
p++;
if (!*p) {