diff options
author | William Wilgus <wilgus.william@gmail.com> | 2024-04-21 08:09:53 -0400 |
---|---|---|
committer | William Wilgus <wilgus.william@gmail.com> | 2024-04-28 01:03:16 -0400 |
commit | 6fccac3f44be01b62b623959361cef2cbb9457a3 (patch) | |
tree | 3370ad54c60f4a3eac99fde6bc61ce5776d58f88 /apps/plugins/lua/lapi.c | |
parent | 2c7e47fc121014c1218d58248cd7c49cf2f38f0a (diff) | |
download | rockbox-6fccac3f44be01b62b623959361cef2cbb9457a3.tar.gz rockbox-6fccac3f44be01b62b623959361cef2cbb9457a3.zip |
lua extend stars demo plugin
extend the stars demo plugin with hit testing and more
draw_poly now returns the extent of the figure it drew
the sim doesn't strip debug info now
unnamed upvals will display "" instead of just ending the debug line
[Bugfix] fix make file name conflict for picross
Change-Id: If342aaff314972c187fa1f299d956e3482366e57
Diffstat (limited to 'apps/plugins/lua/lapi.c')
-rw-r--r-- | apps/plugins/lua/lapi.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/plugins/lua/lapi.c b/apps/plugins/lua/lapi.c index 6426cd94a9..120f8c8313 100644 --- a/apps/plugins/lua/lapi.c +++ b/apps/plugins/lua/lapi.c | |||
@@ -1057,8 +1057,11 @@ static const char *aux_upvalue (StkId fi, int n, TValue **val) { | |||
1057 | } | 1057 | } |
1058 | else { | 1058 | else { |
1059 | Proto *p = f->l.p; | 1059 | Proto *p = f->l.p; |
1060 | if (!(1 <= n && n <= p->sizeupvalues)) return NULL; | 1060 | if (!(1 <= n && n <= p->nups)) // not a valid upvalue |
1061 | return NULL; | ||
1061 | *val = f->l.upvals[n-1]->v; | 1062 | *val = f->l.upvals[n-1]->v; |
1063 | if (!(1 <= n && n <= p->sizeupvalues)) // don't have a name for this upvalue | ||
1064 | return ""; | ||
1062 | return getstr(p->upvalues[n-1]); | 1065 | return getstr(p->upvalues[n-1]); |
1063 | } | 1066 | } |
1064 | } | 1067 | } |