mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-27 07:58:49 +01:00
don't crash when msg doesn't match expected pattern.
This commit is contained in:
parent
51cfbb196e
commit
2406287a34
1 changed files with 3 additions and 1 deletions
|
@ -132,7 +132,9 @@ public class SMSService extends Service {
|
|||
String result = null;
|
||||
if ( msg.startsWith( PUBLIC_HEADER ) ) {
|
||||
int index = msg.lastIndexOf( " " );
|
||||
result = msg.substring( index + 1 );
|
||||
if ( 0 <= index ) {
|
||||
result = msg.substring( index + 1 );
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue