Update of /cvsroot/arianne/stendhal/src/games/stendhal/client/gui
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1081/src/games/stendhal/client/gui
Modified Files:
StendhalChatLineListener.java
Log Message:
fixed StringIndexOutOfBoundsException when simply pressing enter in the chat
Index: StendhalChatLineListener.java
===================================================================
RCS file: /cvsroot/arianne/stendhal/src/games/stendhal/client/gui/StendhalChatLineListener.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** StendhalChatLineListener.java 22 Dec 2005 13:05:42 -0000 1.10
--- StendhalChatLineListener.java 23 Dec 2005 20:14:29 -0000 1.11
***************
*** 138,146 ****
System.out.println ("Player wrote: "+playerChatText.getText());
String text = playerChatText.getText();
! text.trim();
if(text.charAt(0)!='/')
{
! // Chat command. The most frecuent one.
RPAction chat=new RPAction();
chat.put("type","chat");
--- 138,149 ----
System.out.println ("Player wrote: "+playerChatText.getText());
String text = playerChatText.getText();
! text = text.trim();
!
! if (text.length() == 0)
! return;
if(text.charAt(0)!='/')
{
! // Chat command. The most frequent one.
RPAction chat=new RPAction();
chat.put("type","chat");
|