/[LeafOK_CVS]/lbbs/src/menu.c
ViewVC logotype

Diff of /lbbs/src/menu.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.33 by sysadm, Thu May 8 15:24:59 2025 UTC Revision 1.35 by sysadm, Sat May 10 02:52:17 2025 UTC
# Line 522  int load_menu(MENU_SET *p_menu_set, cons Line 522  int load_menu(MENU_SET *p_menu_set, cons
522                                  {                                  {
523                                          fin_line++;                                          fin_line++;
524    
525                                          memcpy(temp, buffer, sizeof(temp)); // Duplicate line for strtok_r                                          strncpy(temp, buffer, sizeof(temp)); // Duplicate line for strtok_r
526                                          p = strtok_r(temp, MENU_CONF_DELIM_WITH_SPACE, &saveptr);                                          p = strtok_r(temp, MENU_CONF_DELIM_WITH_SPACE, &saveptr);
527                                          if (p != NULL && *p == '%') // END of menu screen                                          if (p != NULL && *p == '%') // END of menu screen
528                                          {                                          {
# Line 588  int display_menu(MENU *p_menu) Line 588  int display_menu(MENU *p_menu)
588                  return -1;                  return -1;
589          }          }
590    
591            if (p_menu->item_cur_pos > 0 &&
592                    checkpriv(&BBS_priv, 0, p_menu->items[p_menu->item_cur_pos]->priv) != 0 &&
593                    checklevel(&BBS_priv, p_menu->items[p_menu->item_cur_pos]->level) != 0)
594            {
595                    menu_selectable = 1;
596            }
597    
598          if (p_menu->title.show)          if (p_menu->title.show)
599          {          {
600                  show_top(p_menu->title.text);                  show_top(p_menu->title.text);
# Line 711  int menu_control(MENU_SET *p_menu_set, i Line 718  int menu_control(MENU_SET *p_menu_set, i
718                  {                  {
719                          display_menu_cursor(p_menu, 0);                          display_menu_cursor(p_menu, 0);
720                          p_menu->item_cur_pos = p_menu->item_count - 1;                          p_menu->item_cur_pos = p_menu->item_count - 1;
721                          while (!p_menu->items[p_menu->item_cur_pos]->display ||                          while (p_menu->item_cur_pos >= 0 && !p_menu->items[p_menu->item_cur_pos]->display)
                                    p_menu->items[p_menu->item_cur_pos]->priv != 0 ||  
                                    p_menu->items[p_menu->item_cur_pos]->level != 0)  
722                          {                          {
723                                  p_menu->item_cur_pos--;                                  p_menu->item_cur_pos--;
724                          }                          }


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

webmaster@leafok.com
ViewVC Help
Powered by ViewVC 1.3.0-beta1