Kaynağa Gözat

Catching the random color code for black

david 5 yıl önce
ebeveyn
işleme
b9c854b8b1
1 değiştirilmiş dosya ile 3 ekleme ve 1 silme
  1. 3 1
      mystic.c

+ 3 - 1
mystic.c

@@ -897,6 +897,7 @@ void harry_event(int fd) {
 
   cp = phrases[r];
   int color = random() % 16;
+  if(color == 0){ color++; } // If it's 0 let's make it 1.
   sprintf(buffer, "^S2^C%02d%s^P2^D%02d", color, cp, (int)strlen(cp));
 
   ZF_LOGD("harry_event: render(%d, \"%s\")", fd, buffer);
@@ -1100,7 +1101,8 @@ int mangle(int fd, char *buffer) {
       // This string actually screws up ANSI detection (takes too long)
       // strcpy(display, "^P2^S501234567890^P1abcdef^P2g^P3h^P4i^S0^P2");
 
-      strcpy(display, "^P2^S301234^P15^S0^P2");
+      // strcpy(display, "^P2^S301234^P15^S0^P2");
+      strcpy(display, "^S3^C1Hi^S0^P1");
       // Move the buffer so there's room for the display string.
       memmove(cp + strlen(display), cp, strlen(cp) + 1);
       strncpy(cp, display, strlen(display));