Comparison in nsCSSScanner::ParseRef is always false

RESOLVED FIXED in mozilla1.8beta4

Status

()

RESOLVED FIXED
13 years ago
13 years ago

People

(Reporter: Biesinger, Assigned: dbaron)

Tracking

({fixed1.8})

Trunk
mozilla1.8beta4
x86
Linux
fixed1.8
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [patch])

Attachments

(1 attachment)

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.
Created attachment 193838 [details] [diff] [review]
patch
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
Last Resolved: 13 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?

Updated

13 years ago
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.