From 76d8d0cad0c5733b352238b132e028a1493ab833 Mon Sep 17 00:00:00 2001 From: Mike Baker Date: Fri, 24 Mar 2006 14:21:48 +0000 Subject: [PATCH] fix ipcalc output SVN-Revision: 3473 --- openwrt/package/base-files/default/usr/lib/common.awk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openwrt/package/base-files/default/usr/lib/common.awk b/openwrt/package/base-files/default/usr/lib/common.awk index 250a70f641..a9ab0f1645 100644 --- a/openwrt/package/base-files/default/usr/lib/common.awk +++ b/openwrt/package/base-files/default/usr/lib/common.awk @@ -58,9 +58,9 @@ function ip2int(ip) { return ret } -function int2ip(ip,ret) { +function int2ip(ip,ret,x) { ret=and(ip,255) ip=rshift(ip,8) - for(;ip;ret=and(ip,255)"."ret,ip=rshift(ip,8)); + for(x<3;ret=and(ip,255)"."ret,ip=rshift(ip,8),x++) return ret } -- 2.30.2