Yes, If you have filed your H1-B extension before your H1-B got expired, you would be fine and very well in status. Do not worry as my h1-B extension took amost 8 months and 18 days after filing. You need not worry for 240 days effective from date of H1-B expiry (provided you filed your H1-B extension before expiry of H1-B).
If you filed your H1-B extension after expiry of H1-B than you gotta problem. Consult your attorney.
Guess this gives you ample clear picture.
Best Of Luck!!