Re: [Vala] Error in unary prefixed-increment casuses segfault....



Il giorno ven, 21/01/2011 alle 03.00 +0100, Marco Trevisan (Treviño) ha
scritto:
For some tests, I wrote this small code for implementing a priority
queue... However I found an issue in the unary pre-increment operator.

In fact, look at the PriorityQueue.insert() function, if I do:

      QueueItem qi = new QueueItem(v, priority);
      priority_queue[size++] = qi;
      print("Added value with Prioirity %d\n".printf(priority_queue[size].prio));

Sorry, I meant:
        priority_queue[++size] = qi;

Of course, but the issue doesn't change...





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]