X-Git-Url: http://deadsoftware.ru/gitweb?p=d2df-sdl.git;a=blobdiff_plain;f=src%2Fengine%2Fe_log.pas;h=dbe7b5dc2773f5881427c776d1d66f57e2835e7d;hp=7159c18445614beaff3ba4fc3f534df33d2cf474;hb=4c8663e5276acff2eb18ad93b77f341d330c8702;hpb=7ddf7163be0c145132edc25dadfce685e0e07be3 diff --git a/src/engine/e_log.pas b/src/engine/e_log.pas index 7159c18..dbe7b5d 100644 --- a/src/engine/e_log.pas +++ b/src/engine/e_log.pas @@ -60,7 +60,11 @@ var function DecodeIPV4 (ip: LongWord): string; begin +{$IFDEF FPC_LITTLE_ENDIAN} Result := Format('%d.%d.%d.%d', [ip and $FF, (ip shr 8) and $FF, (ip shr 16) and $FF, (ip shr 24)]); +{$ELSE} + Result := Format('%d.%d.%d.%d', [(ip shr 24), (ip shr 16) and $FF, (ip shr 8) and $FF, ip and $FF]); +{$ENDIF} end;