diff --git a/components/geckoport/nsInit.pas b/components/geckoport/nsInit.pas index 04b00efaa..dce1e042f 100755 --- a/components/geckoport/nsInit.pas +++ b/components/geckoport/nsInit.pas @@ -1260,8 +1260,12 @@ begin l := NS_StrLen(buffer); if (buffer[0] = '#') or (l=0) then Continue; - if buffer[l-1] in [#10, #13] then - buffer[l-1]:= #0; + if l>0 then + if buffer[l-1] in [#10, #13] then + buffer[l-1]:= #0; + if l>1 then + if buffer[l-2] in [#10, #13] then + buffer[l-2]:= #0; NS_StrCopy(buffer2, xpcomdir); NS_StrLCat(buffer2, DirectorySeparator, MAX_PATH); NS_StrLCat(buffer2, buffer, MAX_PATH); diff --git a/components/geckoport/nsTypes.pas b/components/geckoport/nsTypes.pas index b7564533a..3407558f8 100644 --- a/components/geckoport/nsTypes.pas +++ b/components/geckoport/nsTypes.pas @@ -56,22 +56,27 @@ type {$IFNDEF FPC} size_t = SizeUint; {$ENDIF} - +{$IFDEF CPU64} + PRSize = PtrUInt; +{$ELSE} PRSize = PRUint32; +{$ENDIF} PRFileDesc = type Pointer; PRLibrary = type Pointer; + nsCoord = PRInt32; + nsPoint = record - x, y: Longint; + x, y: nsCoord; end; nsRect = record - left, top, right, bottom: Longint; + left, top, right, bottom: nsCoord; end; nsMargin = record - left, top, right, bottom: Longint; + left, top, right, bottom: nsCoord; end; TGUIDArray = array[0..16383] of TGUID;