Fix a bug that can lead to premature garbage collection of mini plots - gsl-shell.git - gsl-shell

index : gsl-shell.git
gsl-shell
summary refs log tree commit diff
path: root/agg-plot/lua-plot.cpp
diff options
context:
space:
mode:
authorFrancesco Abbate <francesco.bbt@gmail.com>2012年02月05日 15:32:09 +0100
committerFrancesco Abbate <francesco.bbt@gmail.com>2012年02月05日 15:32:09 +0100
commit8a884e1444a053e7ae9dab850558a99879998df5 (patch)
treed4fe9918f04d907b9299ec10e73f8100b38995ed /agg-plot/lua-plot.cpp
parentc8bb33acb055177d73fd11a807761a87b1b4a54f (diff)
downloadgsl-shell-8a884e1444a053e7ae9dab850558a99879998df5.tar.gz
Fix a bug that can lead to premature garbage collection of mini plots
Diffstat (limited to 'agg-plot/lua-plot.cpp')
-rw-r--r--agg-plot/lua-plot.cpp 3
1 files changed, 2 insertions, 1 deletions
diff --git a/agg-plot/lua-plot.cpp b/agg-plot/lua-plot.cpp
index e567fe2f..5746a21d 100644
--- a/agg-plot/lua-plot.cpp
+++ b/agg-plot/lua-plot.cpp
@@ -671,8 +671,9 @@ plot_set_mini(lua_State *L)
else
return luaL_error (L, "invalid mini plot placement specification.");
+ int ref_index = (1 << 16) + (int)pos;
lua_getfenv (L, 1);
- objref_mref_add (L, -1, (int)pos, 3);
+ objref_mref_add (L, -1, ref_index, 2);
AGG_LOCK();
p->add_mini_plot(mp, pos);
generated by cgit v1.2.3 (git 2.39.1) at 2025年09月12日 06:35:55 +0000

AltStyle によって変換されたページ (->オリジナル) /