Skip to content

Commit

Permalink
Fixing Swift 3.1 "explicit type conversion" Warning issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
RockfordWei committed Apr 20, 2017
1 parent 1ea4f6f commit 5248200
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/Regex.swift
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ extension String {

// save the result into the duplicated string
memset(copy!, 0, Int(sz))
memcpy(copy!, cursor!.advanced(by: Int(p.rm_so)), p.rm_eo - p.rm_so)
memcpy(copy!, cursor!.advanced(by: Int(p.rm_so)), Int(p.rm_eo) - Int(p.rm_so))

// turn the pointer into string
let extraction = String(cString: copy!)
Expand Down

0 comments on commit 5248200

Please sign in to comment.