You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by so...@apache.org on 2017/02/28 02:30:08 UTC

[28/50] incubator-weex git commit: * [ios] bug: if '(' not exist , should judgement, thanks @acton393

* [ios] bug: if '(' not exist , should judgement,thanks @acton393


Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/d543d442
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/d543d442
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/d543d442

Branch: refs/heads/0.11-dev
Commit: d543d4427a9555740328e11fd3adc7ec25a281ae
Parents: 64013ea
Author: \u9f50\u5c71 <su...@163.com>
Authored: Thu Feb 23 13:10:49 2017 +0800
Committer: \u9f50\u5c71 <su...@163.com>
Committed: Thu Feb 23 13:10:49 2017 +0800

----------------------------------------------------------------------
 ios/sdk/WeexSDK/Sources/Utility/WXBoxShadow.m | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/d543d442/ios/sdk/WeexSDK/Sources/Utility/WXBoxShadow.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Utility/WXBoxShadow.m b/ios/sdk/WeexSDK/Sources/Utility/WXBoxShadow.m
index 6362a43..c56f365 100644
--- a/ios/sdk/WeexSDK/Sources/Utility/WXBoxShadow.m
+++ b/ios/sdk/WeexSDK/Sources/Utility/WXBoxShadow.m
@@ -61,7 +61,7 @@
     if ([string rangeOfString:@"rgb"].location != NSNotFound) {
         NSRange begin = [string rangeOfString:@"rgb"];
         NSRange end = [string rangeOfString:@")"];
-        if (begin.location < end.location) {
+        if (begin.location < end.location && end.location < [string length]) {
             NSRange range = NSMakeRange(begin.location, end.location-begin.location + 1);
             NSString *str = [string substringWithRange:range];
             NSString *colorStr = [str stringByReplacingOccurrencesOfString:@" " withString:@""];