From: dooglus Date: Thu, 17 Jan 2008 15:59:18 +0000 (+0000) Subject: Be stricter on the "c[0-9]" link names accepted. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=ec30f0d2bd7179e97299eb9bd8dfc1913896b05a;p=synfig.git Be stricter on the "c[0-9]" link names accepted. git-svn-id: http://svn.voria.com/code@1392 1f10aa63-cdf2-0310-b900-c93c546f37ac --- diff --git a/synfig-core/trunk/src/synfig/valuenode_composite.cpp b/synfig-core/trunk/src/synfig/valuenode_composite.cpp index e10999a..8d7428b 100644 --- a/synfig-core/trunk/src/synfig/valuenode_composite.cpp +++ b/synfig-core/trunk/src/synfig/valuenode_composite.cpp @@ -364,11 +364,8 @@ ValueNode_Composite::get_link_index_from_name(const String &name)const if(name.empty()) throw Exception::BadLinkName(name); - if(name[0]=='c') - { - warning("%s:%d is this EVER called?", __FILE__, __LINE__); + if(name[0]=='c' && name.size() == 2 && name[1]-'1' >= 0 && name[1]-'1' < link_count()) return name[1]-'1'; - } switch(get_type()) {