Fix 'show translations'
authorJames Golovich <james@gnuinter.net>
Thu, 26 Feb 2004 01:12:38 +0000 (01:12 +0000)
committerJames Golovich <james@gnuinter.net>
Thu, 26 Feb 2004 01:12:38 +0000 (01:12 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2249 65c4cc65-6c06-0410-ace0-fbb531ad65f3

translate.c

index c297886..24ed38f 100755 (executable)
@@ -265,14 +265,14 @@ static int show_translation(int fd, int argc, char *argv[])
                strcpy(line, " ");
                for (y=-1;y<SHOW_TRANS;y++) {
                        if (x >= 0 && y >= 0 && tr_matrix[x][y].step)
-                               snprintf(line + strlen(line), sizeof(line) - strlen(line), " %5d", tr_matrix[x][y].cost);
+                               snprintf(line + strlen(line), sizeof(line) - strlen(line), " %5d", tr_matrix[x][y].cost >= 99999 ? tr_matrix[x][y].cost-99999 : tr_matrix[x][y].cost);
                        else
                                if (((x == -1 && y >= 0) || (y == -1 && x >= 0))) {
                                        snprintf(line + strlen(line), sizeof(line) - strlen(line), 
                                                " %5s", ast_getformatname(1<<(x+y+1)) );
-                               } else if (x != -1 && y != -1 && y != 4) {
+                               } else if (x != -1 && y != -1) {
                                        snprintf(line + strlen(line), sizeof(line) - strlen(line), "     -");
-                               } else if (y != 4) {
+                               } else {
                                        snprintf(line + strlen(line), sizeof(line) - strlen(line), "      ");
                                }
                }