OSDN Git Service
(root)
/
hmh
/
hhml.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
034cb72
)
fix.
author
visor
<visor@users.sourceforge.jp>
Sat, 12 Dec 2015 13:59:48 +0000
(22:59 +0900)
committer
visor
<visor@users.sourceforge.jp>
Sat, 12 Dec 2015 13:59:48 +0000
(22:59 +0900)
wiki/wikiline.cc
patch
|
blob
|
history
diff --git
a/wiki/wikiline.cc
b/wiki/wikiline.cc
index
9209445
..
c6a5031
100644
(file)
--- a/
wiki/wikiline.cc
+++ b/
wiki/wikiline.cc
@@
-187,8
+187,13
@@
bool wl_nth (WikiMotorObjVecVec* args, WikiMotorObjVec& out, WikiFormat* wiki)
idx = strtol ((*args)[1]->textOut (wiki));
e = wiki->getVar (var);
if (e ()) {
- e = e ()->vectorGet (idx);
- val = fixUTF8 (to_string (e ()));
+ MNode* a = e ();
+ while (idx > 0 && a && a->isCons ()) {
+ idx --;
+ nextNode (a);
+ }
+ if (a && a->isCons ())
+ val = fixUTF8 (to_string (a->car ()));
return outamp_opt (o, opt, val);
}
return true;