From 18840e36df83bd221ff2d7de8e2cc0988f2eedcb Mon Sep 17 00:00:00 2001 From: Francisco Castro Date: Tue, 16 May 2017 23:16:34 -0300 Subject: [PATCH] Fix bug #40: string.sub broken for j=0 or j 0) { i = i - 1; @@ -1933,6 +1933,7 @@ } if (j < 0) j = s.length + j + 1; + if (i > j) return ''; return s.substring(i, j); },