aboutsummaryrefslogtreecommitdiffstats
path: root/addr2line.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-01-12 15:35:07 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-01-12 15:35:07 +0000
commite57215bf51b99836a766f497a405760e8026d2ec (patch)
treed4957b35227996816952c95896f25fa836800001 /addr2line.c
parentb1f8bbf4f7fca70b3a173932f2f3c9cfed07b075 (diff)
downloadruby-e57215bf51b99836a766f497a405760e8026d2ec.tar.gz
* 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
Diffstat (limited to 'addr2line.c')
-rw-r--r--addr2line.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/addr2line.c b/addr2line.c
index 605c6f60d3..91b4be99ab 100644
--- a/addr2line.c
+++ b/addr2line.c
@@ -121,7 +121,7 @@ get_nth_dirname(int dir, char *p)
if (!dir--) {
return "";
}
- while (dir) {
+ while (dir--) {
while (*p) p++;
p++;
if (!*p) {