mirror of
https://github.com/ethauvin/JSON-java.git
synced 2025-06-17 07:50:52 -07:00
Fixes position reports on errors
This commit is contained in:
parent
1add1247fa
commit
e7e6ed9205
3 changed files with 67 additions and 48 deletions
11
CDL.java
11
CDL.java
|
@ -22,7 +22,7 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
*/
|
||||
*/
|
||||
|
||||
/**
|
||||
* This provides static methods to convert comma delimited text into a
|
||||
|
@ -70,9 +70,12 @@ public class CDL {
|
|||
c = x.next();
|
||||
if (c == q) {
|
||||
//Handle escaped double-quote
|
||||
if(x.next() != '\"')
|
||||
{
|
||||
x.back();
|
||||
char nextC = x.next();
|
||||
if(nextC != '\"') {
|
||||
// if our quote was the end of the file, don't step
|
||||
if(nextC > 0) {
|
||||
x.back();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue