From: <jom...@us...> - 2014-04-23 13:24:36
|
Revision: 1774 http://sourceforge.net/p/jason/svn/1774 Author: jomifred Date: 2014-04-23 13:24:33 +0000 (Wed, 23 Apr 2014) Log Message: ----------- fix a bug related to parsing messages as reported and fixed by Lucas W. Hilgert Modified Paths: -------------- trunk/src/jason/asSemantics/Message.java Modified: trunk/src/jason/asSemantics/Message.java =================================================================== --- trunk/src/jason/asSemantics/Message.java 2014-04-20 23:30:57 UTC (rev 1773) +++ trunk/src/jason/asSemantics/Message.java 2014-04-23 13:24:33 UTC (rev 1774) @@ -164,7 +164,7 @@ if (msg.startsWith("<")) { one = msg.indexOf(","); int arrowIndex = msg.indexOf("->"); - if (one > arrowIndex) { // If there is an arrow before the first comma + if ((arrowIndex > 0) && (one > arrowIndex)) { // If there is an arrow before the first comma newmsg.msgId = msg.substring(1, arrowIndex); newmsg.inReplyTo = msg.substring(arrowIndex + 2, one); } else { // If not (either there is no arrow, or there is one behind the first comma) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |