Closed Bug 305947 Opened 19 years ago Closed 19 years ago

Comparison in nsCSSScanner::ParseRef is always false

Categories

(Core :: CSS Parsing and Computation, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.8beta4

People

(Reporter: Biesinger, Assigned: dbaron)

Details

(Keywords: fixed1.8, Whiteboard: [patch])

Attachments

(1 file)

nsCSSScanner.cpp has this code:
  PRUnichar ch = Read(aErrorCode);
  if (ch < 0) {
    return PR_FALSE;
  }

However, a PRUnichar is an unsigned data type. The return value of Read is
PRInt32, presumably due to exactly that reason. Probably ch should be a PRInt32.

This is in PRBool nsCSSScanner::ParseRef, last touched by bz in Bug 299148.
Summary: Comparison is always false → Comparison in nsCSSScanner::ParseRef is always false
ch should be a PRInt32, like it is everywhere else.
Attached patch patchSplinter Review
Attachment #193838 - Flags: superreview?(bzbarsky)
Attachment #193838 - Flags: review?(bzbarsky)
Status: NEW → ASSIGNED
Whiteboard: [patch]
Target Milestone: --- → mozilla1.8beta4
Attachment #193838 - Flags: superreview?(bzbarsky)
Attachment #193838 - Flags: superreview+
Attachment #193838 - Flags: review?(bzbarsky)
Attachment #193838 - Flags: review+
Fix checked in to trunk, 2005-08-26 22:59 -0700.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Comment on attachment 193838 [details] [diff] [review]
patch

Trivial fix to earlier patch to correct EOF handling.
Attachment #193838 - Flags: approval1.8b4?
Attachment #193838 - Flags: approval1.8b4? → approval1.8b4+
Fix checked in to MOZILLA_1_8_BRANCH, 2005-08-29 12:35 -0700.
Keywords: fixed1.8
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: