Author Topic: Code hell !  (Read 384 times)

Offline straffo

  • Persona Non Grata
  • Plutonium Member
  • *******
  • Posts: 10029
Code hell !
« on: October 13, 2005, 09:02:48 AM »
Here id is a string converted to long then casted to void *
Then this method is called  :

void FenI_DCAT_02_17::cbClickRna(void* fenetre, void* controle, void* Id)
{
   long * pTemp = (long*) Id ;Ok cast to long ... I can understand
   pCast(fenetre)->clickerRna((void*) pTemp[0]);  wtf ??? note we pass the value , not the @
}

Let see clickerRna now ...

void FenI_DCAT_02_17::clickerRna(void* Id)
{
   CWaitCursor sablier;

   long num = (long) Id; wtf  cast to long again... ?
   m_pAppli->restituerNotice(m_pOeRC, num);

}
Guess what in restituerNotice the parameter num is converted to ... string !!

It's the magic roundabout !

Offline AKS\/\/ulfe

  • Platinum Member
  • ******
  • Posts: 4287
Code hell !
« Reply #1 on: October 13, 2005, 09:06:10 AM »
Is that the code that renames French fries to Freedom fries?
-SW

Offline deSelys

  • Gold Member
  • *****
  • Posts: 2512
Code hell !
« Reply #2 on: October 13, 2005, 09:10:41 AM »
HHHHHUUUUUUUUUuuuuuuuuuuuuuuu uuuuuuuuuuuuuuuuuuuuuuuuuuhhh hh???:huh
Current ID: Romanov

It's all fun and games until someone loses an eye... then it's just a game to find the eye

'I AM DID NOTHING WRONG' - Famous last forum words by legoman

Offline straffo

  • Persona Non Grata
  • Plutonium Member
  • *******
  • Posts: 10029
Code hell !
« Reply #3 on: October 13, 2005, 09:35:11 AM »
And now for something not really different !

une autre pour la route !

Booleen z_bGriser (FAUX);

   // verification qu'une notice est memorisee
   if (BnfSession::instance()->noticeMemorisee()->nature() != BnfNoticeMemorisee::aucun)
   {
      z_bGriser = VRAI;
   }
   else
   {
      z_bGriser = FAUX;
      return z_bGriser;
   }

   // verification que la notice memorisee est une notice bibliographique
   BnfNoticeMemorisee::NatureNotice z_txtNature = BnfSession::instance()->noticeMemorisee()->nature();
    if (z_txtNature == BnfNoticeMemorisee::autorite)
   {
      z_bGriser *= VRAI; 0 * 1 = 0 no ? wtf is this !
   }
   else
   {
      z_bGriser = FAUX;
      return z_bGriser;
   }

Offline deSelys

  • Gold Member
  • *****
  • Posts: 2512
Code hell !
« Reply #4 on: October 13, 2005, 09:43:52 AM »
Is this VisualVoodoo 7.2?
Current ID: Romanov

It's all fun and games until someone loses an eye... then it's just a game to find the eye

'I AM DID NOTHING WRONG' - Famous last forum words by legoman

Offline straffo

  • Persona Non Grata
  • Plutonium Member
  • *******
  • Posts: 10029
Code hell !
« Reply #5 on: October 13, 2005, 09:49:45 AM »
Nope it's : we are lucky it work !

( a million € project !)

Offline T0J0

  • Silver Member
  • ****
  • Posts: 1056
Code hell !
« Reply #6 on: October 13, 2005, 12:26:16 PM »
Thats the statement that calculates and rounds the euro transactions on iraqii oil for food profits and dumps it in a swiss bank account?

TJ

Offline DREDIOCK

  • Plutonium Member
  • *******
  • Posts: 17775
Code hell !
« Reply #7 on: October 13, 2005, 05:43:18 PM »
Quote
Originally posted by T0J0
Thats the statement that calculates and rounds the euro transactions on iraqii oil for food profits and dumps it in a swiss bank account?

TJ
:rofl
Death is no easy answer
For those who wish to know
Ask those who have been before you
What fate the future holds
It ain't pretty

Offline Saintaw

  • Platinum Member
  • ******
  • Posts: 6692
      • My blog
Code hell !
« Reply #8 on: October 14, 2005, 01:05:51 AM »
Straffo, add a division by zero in there, just to make it fun :D
Saw
Dirty, nasty furriner.

Offline AKKarma

  • Zinc Member
  • *
  • Posts: 78
Code hell !
« Reply #9 on: October 14, 2005, 10:37:09 AM »
Quote
Originally posted by straffo
// verification que la notice memorisee est une notice bibliographique

I have no idea what this comment says, but I just pasted it into the C# module that I'm working on.  :aok

Offline straffo

  • Persona Non Grata
  • Plutonium Member
  • *******
  • Posts: 10029
Code hell !
« Reply #10 on: October 14, 2005, 01:37:20 PM »
:lol

I'm working on a software for archivists ,exactly I'm working on the catalogue part

The part which generate this kind of mess