From 04da0a40c0a541c32140ac952823a9d768cfaf8d Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 18 Jun 2014 10:54:31 -0300 Subject: [PATCH] added assertion about sources being the same for all protos in a chunk --- ldump.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ldump.c b/ldump.c index cb07aa17..e1f9fc3b 100644 --- a/ldump.c +++ b/ldump.c @@ -1,5 +1,5 @@ /* -** $Id: ldump.c,v 2.29 2014/04/01 14:39:55 roberto Exp roberto $ +** $Id: ldump.c,v 2.30 2014/06/18 13:21:12 roberto Exp roberto $ ** save precompiled Lua chunks ** See Copyright Notice in lua.h */ @@ -120,8 +120,10 @@ static void DumpConstants (const Proto *f, DumpState *D) { } n = f->sizep; DumpInt(n, D); - for (i = 0; i < n; i++) + for (i = 0; i < n; i++) { + lua_assert(f->source == f->p[i]->source); /* same source for all protos */ DumpFunction(f->p[i], D); + } }