~darkmuggle-deactivatedaccount/ubuntu/quantal/grub2/fix-872244

« back to all changes in this revision

Viewing changes to grub-core/commands/menuentry.c

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson
  • Date: 2011-05-17 23:59:10 UTC
  • mto: (17.3.55 sid)
  • mto: This revision was merged to the branch mainline in revision 122.
  • Revision ID: james.westby@ubuntu.com-20110517235910-ma8u889vyjdfro27
Tags: upstream-1.99
ImportĀ upstreamĀ versionĀ 1.99

Show diffs side-by-side

added added

removed removed

Lines of Context:
91
91
  if (! menu_sourcecode)
92
92
    return grub_errno;
93
93
 
94
 
  if (classes)
 
94
  if (classes && classes[0])
95
95
    {
96
96
      int i;
97
97
      for (i = 0; classes[i]; i++); /* count # of menuentry classes */
255
255
 
256
256
  if (! ctxt->script)
257
257
    return grub_normal_add_menu_entry (argc, (const char **) args,
258
 
                                       ctxt->state[0].args, ctxt->state[1].arg,
 
258
                                       (ctxt->state[0].set ? ctxt->state[0].args
 
259
                                        : NULL), ctxt->state[1].arg,
259
260
                                       ctxt->state[2].arg, 0,
260
261
                                       ctxt->state[3].arg,
261
262
                                       ctxt->extcmd->cmd->name[0] == 's');