[pdfmod] [PdfSharp] Fix exception thrown loading a PDF I have
- From: Gabriel Burt <gburt src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [pdfmod] [PdfSharp] Fix exception thrown loading a PDF I have
- Date: Fri, 7 Aug 2009 01:16:16 +0000 (UTC)
commit 981be310e524f7177a900d21ccd0d735c036e73f
Author: Gabriel Burt <gabriel burt gmail com>
Date: Thu Aug 6 18:13:48 2009 -0700
[PdfSharp] Fix exception thrown loading a PDF I have
src/Libraries/PdfSharp/PdfSharp.Pdf.IO/Lexer.cs | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
---
diff --git a/src/Libraries/PdfSharp/PdfSharp.Pdf.IO/Lexer.cs b/src/Libraries/PdfSharp/PdfSharp.Pdf.IO/Lexer.cs
index f489d0e..37494be 100644
--- a/src/Libraries/PdfSharp/PdfSharp.Pdf.IO/Lexer.cs
+++ b/src/Libraries/PdfSharp/PdfSharp.Pdf.IO/Lexer.cs
@@ -727,11 +727,14 @@ namespace PdfSharp.Pdf.IO
}
if (char.IsLetterOrDigit(this.currChar))
{
- hex[0] = char.ToUpper(this.currChar);
- hex[1] = char.ToUpper(this.nextChar);
- int ch = int.Parse(new string(hex), NumberStyles.AllowHexSpecifier);
- this.token.Append(Convert.ToChar(ch));
- ScanNextChar();
+ if (char.IsLetterOrDigit(this.nextChar))
+ {
+ hex[0] = char.ToUpper(this.currChar);
+ hex[1] = char.ToUpper(this.nextChar);
+ int ch = int.Parse(new string(hex), NumberStyles.AllowHexSpecifier);
+ this.token.Append(Convert.ToChar(ch));
+ ScanNextChar();
+ }
ScanNextChar();
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]