summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7ddf716)
raw | patch | inline | side by side (parent: 7ddf716)
author | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Sun, 2 Jan 2022 18:15:06 +0000 (21:15 +0300) | ||
committer | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Sun, 2 Jan 2022 18:15:06 +0000 (21:15 +0300) |
src/engine/e_log.pas | patch | blob | history |
diff --git a/src/engine/e_log.pas b/src/engine/e_log.pas
index 7159c18445614beaff3ba4fc3f534df33d2cf474..dbe7b5dc2773f5881427c776d1d66f57e2835e7d 100644 (file)
--- a/src/engine/e_log.pas
+++ b/src/engine/e_log.pas
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;